Lines Matching defs:attr

56 add_to_attrs(PyObject *attrs, PyObject *key, PyObject *attr, bool concat)
63 return (PyDict_SetItem(attrs, key, attr));
82 /* decrefing "attr" is handled by caller */
84 str = PyUnicode_Concat(str, attr);
86 PyString_Concat(&str, attr);
93 return (PyList_Append(av, attr));
96 /* decrefing "attr" is handled by caller */
98 av = PyUnicode_Concat(av, attr);
100 PyString_Concat(&av, attr);
115 Py_INCREF(attr);
116 PyList_SET_ITEM(list, 1, attr);
171 PyObject *attr = NULL;
190 Py_XDECREF(attr);\
467 attr = PyUnicode_FromStringAndSize(
470 attr = PyString_FromStringAndSize(
473 if (attr == NULL) {
480 Py_XDECREF(attr);
482 attr = PyUnicode_FromStringAndSize(
485 attr = PyString_FromStringAndSize(
488 if (attr == NULL) {
495 char *as = PyBytes_AsString(attr);
501 hash = attr;
502 attr = NULL;
505 PyUnicode_InternInPlace(&attr);
507 PyString_InternInPlace(&attr);
510 if (add_to_attrs(attrs, key, attr,
522 Py_XDECREF(attr);
524 attr = PyUnicode_FromStringAndSize(&str[vs],
527 attr = PyString_FromStringAndSize(&str[vs],
531 char *as = PyBytes_AsString(attr);
537 hash = attr;
538 attr = NULL;
541 PyUnicode_InternInPlace(&attr);
543 PyString_InternInPlace(&attr);
545 if (add_to_attrs(attrs, key, attr,
581 Py_XDECREF(attr);
583 attr = PyUnicode_FromStringAndSize(&str[vs], i - vs);
585 attr = PyString_FromStringAndSize(&str[vs], i - vs);
588 char *as = PyBytes_AsString(attr);
594 hash = attr;
595 attr = NULL;
598 PyUnicode_InternInPlace(&attr);
600 PyString_InternInPlace(&attr);
602 if (add_to_attrs(attrs, key, attr, false) == -1) {
622 Py_XDECREF(attr);