Lines Matching defs:str
68 PyObject *str, *oldstr;
76 * object in str with a new reference, which we must
80 oldstr = str = PyList_GET_ITEM(av, len - 1);
84 str = PyUnicode_Concat(str, attr);
86 PyString_Concat(&str, attr);
88 if (str == NULL)
90 return (PyList_SetItem(av, len - 1, str));
123 set_malformederr(const char *str, int pos, const char *msg)
127 if ((val = Py_BuildValue("sis", str, pos, msg)) != NULL) {
134 set_invaliderr(const char *str, const char *msg)
138 if ((val = Py_BuildValue("ss", str, msg)) != NULL) {
154 char *str = NULL;
181 * after. Likewise, PyMem_Free(str) should not be called before using
185 #define malformed(msg) set_malformederr(str, i, (msg))
186 #define invalid(msg) set_invaliderr(str, (msg))
188 PyMem_Free(str);\
212 "utf-8", &str, &strl, &act_data) == 0) {
216 s = strpbrk(str, " \t\n");
221 PyMem_Free(str);
231 typestrl = s - str;
234 if (strncmp(str, "file", 4) == 0) {
237 } else if (strncmp(str, "link", 4) == 0)
239 else if (strncmp(str, "user", 4) == 0)
242 if (strncmp(str, "depend", 6) == 0)
244 else if (strncmp(str, "driver", 6) == 0)
246 else if (strncmp(str, "legacy", 6) == 0)
249 if (strncmp(str, "set", 3) == 0)
251 else if (strncmp(str, "dir", 3) == 0)
254 if (strncmp(str, "hardlink", 8) == 0)
257 if (strncmp(str, "license", 7) == 0) {
260 } else if (strncmp(str, "unknown", 7) == 0)
263 if (strncmp(str, "signature", 9) == 0) {
268 if (strncmp(str, "group", 5) == 0)
273 if ((act_args = Py_BuildValue("s#s#", str, strl,
274 str, typestrl)) != NULL) {
277 PyMem_Free(str);
286 PyMem_Free(str);
293 PyMem_Free(str);
296 for (i = s - str; str[i]; i++) {
299 keystr = &str[ks];
301 if (str[i] == ' ' || str[i] == '\t' || str[i] == '\n') {
327 } else if (str[i] == '=') {
372 if (str[i] == '\'' || str[i] == '\"') {
375 quote = str[i];
377 } else if (str[i] == ' ' || str[i] == '\t' ||
378 str[i] == '\n') {
387 } else if (str[i] == '\'' || str[i] == '\"') {
393 if (str[i] == '\\') {
407 PyMem_Free(str);
422 PyMem_Free(str);
427 if (str[i] == '\\' || str[i] == quote) {
436 } else if (str[i] == quote) {
446 PyMem_Free(str);
451 * Copy the attribute from str into
460 sattr[j - o] = str[vs + j];
483 &str[vs], i - vs);
486 &str[vs], i - vs);
519 if (str[i] == ' ' || str[i] == '\t' || str[i] == '\n') {
524 attr = PyUnicode_FromStringAndSize(&str[vs],
527 attr = PyString_FromStringAndSize(&str[vs],
553 if (str[i] != ' ' && str[i] != '\t' && str[i] != '\n') {
556 if (str[i] == '=') {
561 (str[i] == '\'' || str[i] == '\"')) {
567 quote = str[i];
583 attr = PyUnicode_FromStringAndSize(&str[vs], i - vs);
585 attr = PyString_FromStringAndSize(&str[vs], i - vs);
620 PyMem_Free(str);