• Home
  • Raw
  • Download

Lines Matching refs:attrib

168     PyObject* attrib;  member
214 create_extra(ElementObject* self, PyObject* attrib) in create_extra() argument
222 if (!attrib) in create_extra()
223 attrib = Py_None; in create_extra()
225 Py_INCREF(attrib); in create_extra()
226 self->extra->attrib = attrib; in create_extra()
243 Py_DECREF(extra->attrib); in dealloc_extra()
274 create_new_element(PyObject* tag, PyObject* attrib) in create_new_element() argument
297 if (attrib != Py_None && !is_empty_dict(attrib)) { in create_new_element()
298 if (create_extra(self, attrib) < 0) { in create_new_element()
342 PyObject *attrib = PyDict_GetItem(kwds, attrib_str); in get_attrib_from_keywords() local
344 if (attrib) { in get_attrib_from_keywords()
348 if (!PyDict_Check(attrib)) { in get_attrib_from_keywords()
351 Py_TYPE(attrib)->tp_name); in get_attrib_from_keywords()
354 attrib = PyDict_Copy(attrib); in get_attrib_from_keywords()
355 if (attrib && PyDict_DelItem(kwds, attrib_str) < 0) { in get_attrib_from_keywords()
356 Py_DECREF(attrib); in get_attrib_from_keywords()
357 attrib = NULL; in get_attrib_from_keywords()
360 attrib = PyDict_New(); in get_attrib_from_keywords()
365 if (attrib != NULL && PyDict_Update(attrib, kwds) < 0) { in get_attrib_from_keywords()
366 Py_DECREF(attrib); in get_attrib_from_keywords()
369 return attrib; in get_attrib_from_keywords()
384 PyObject *attrib = NULL; in element_init() local
387 if (!PyArg_ParseTuple(args, "O|O!:Element", &tag, &PyDict_Type, &attrib)) in element_init()
390 if (attrib) { in element_init()
392 attrib = PyDict_Copy(attrib); in element_init()
393 if (!attrib) in element_init()
396 if (PyDict_Update(attrib, kwds) < 0) { in element_init()
397 Py_DECREF(attrib); in element_init()
403 attrib = get_attrib_from_keywords(kwds); in element_init()
404 if (!attrib) in element_init()
410 if (attrib != NULL && !is_empty_dict(attrib)) { in element_init()
411 if (create_extra(self_elem, attrib) < 0) { in element_init()
412 Py_DECREF(attrib); in element_init()
418 Py_XDECREF(attrib); in element_init()
511 PyObject* res = self->extra->attrib; in element_get_attrib()
519 self->extra->attrib = res; in element_get_attrib()
576 PyObject* attrib = NULL; in subelement() local
579 &PyDict_Type, &attrib)) { in subelement()
583 if (attrib) { in subelement()
585 attrib = PyDict_Copy(attrib); in subelement()
586 if (!attrib) in subelement()
588 if (kwds != NULL && PyDict_Update(attrib, kwds) < 0) { in subelement()
589 Py_DECREF(attrib); in subelement()
594 attrib = get_attrib_from_keywords(kwds); in subelement()
595 if (!attrib) in subelement()
600 attrib = Py_None; in subelement()
603 elem = create_new_element(tag, attrib); in subelement()
604 Py_DECREF(attrib); in subelement()
625 Py_VISIT(self->extra->attrib); in element_gc_traverse()
719 self->tag, (self->extra) ? self->extra->attrib : Py_None); in _elementtree_Element___copy___impl()
766 PyObject* attrib; in _elementtree_Element___deepcopy___impl() local
776 attrib = deepcopy(self->extra->attrib, memo); in _elementtree_Element___deepcopy___impl()
777 if (!attrib) { in _elementtree_Element___deepcopy___impl()
783 attrib = Py_None; in _elementtree_Element___deepcopy___impl()
786 element = (ElementObject*) create_new_element(tag, attrib); in _elementtree_Element___deepcopy___impl()
789 Py_DECREF(attrib); in _elementtree_Element___deepcopy___impl()
943 noattrib = (self->extra == NULL || self->extra->attrib == Py_None); in _elementtree_Element___getstate___impl()
955 PICKLED_ATTRIB, self->extra->attrib, in _elementtree_Element___getstate___impl()
974 PyObject *attrib, in element_setstate_from_attributes() argument
999 if (!children && !attrib) { in element_setstate_from_attributes()
1025 assert(self->extra->attrib == Py_None); in element_setstate_from_attributes()
1026 self->extra->attrib = oldextra->attrib; in element_setstate_from_attributes()
1027 oldextra->attrib = Py_None; in element_setstate_from_attributes()
1046 if (attrib) { in element_setstate_from_attributes()
1047 Py_INCREF(attrib); in element_setstate_from_attributes()
1048 Py_XSETREF(self->extra->attrib, attrib); in element_setstate_from_attributes()
1065 PyObject *tag, *attrib, *text, *tail, *children; in element_setstate_from_Python() local
1068 tag = attrib = text = tail = children = NULL; in element_setstate_from_Python()
1074 &attrib, &text, &tail, &children)) in element_setstate_from_Python()
1075 retval = element_setstate_from_attributes(self, tag, attrib, text, in element_setstate_from_Python()
1382 if (!self->extra || self->extra->attrib == Py_None) in _elementtree_Element_get_impl()
1385 value = PyDict_GetItem(self->extra->attrib, key); in _elementtree_Element_get_impl()
1564 if (!self->extra || self->extra->attrib == Py_None) in _elementtree_Element_items_impl()
1567 return PyDict_Items(self->extra->attrib); in _elementtree_Element_items_impl()
1579 if (!self->extra || self->extra->attrib == Py_None) in _elementtree_Element_keys_impl()
1582 return PyDict_Keys(self->extra->attrib); in _elementtree_Element_keys_impl()
1605 PyObject *attrib) in _elementtree_Element_makeelement_impl() argument
1610 attrib = PyDict_Copy(attrib); in _elementtree_Element_makeelement_impl()
1611 if (!attrib) in _elementtree_Element_makeelement_impl()
1614 elem = create_new_element(tag, attrib); in _elementtree_Element_makeelement_impl()
1616 Py_DECREF(attrib); in _elementtree_Element_makeelement_impl()
1711 PyObject* attrib; in _elementtree_Element_set_impl() local
1718 attrib = element_get_attrib(self); in _elementtree_Element_set_impl()
1719 if (!attrib) in _elementtree_Element_set_impl()
1722 if (PyDict_SetItem(attrib, key, value) < 0) in _elementtree_Element_set_impl()
2068 Py_SETREF(self->extra->attrib, value); in element_attrib_setter()
2563 PyObject* attrib) in treebuilder_handle_start() argument
2574 node = create_new_element(tag, attrib); in treebuilder_handle_start()
2575 } else if (attrib == Py_None) { in treebuilder_handle_start()
2576 attrib = PyDict_New(); in treebuilder_handle_start()
2577 if (!attrib) in treebuilder_handle_start()
2580 tag, attrib, NULL); in treebuilder_handle_start()
2581 Py_DECREF(attrib); in treebuilder_handle_start()
2585 tag, attrib, NULL); in treebuilder_handle_start()
2998 PyObject* attrib; in expat_start_handler() local
3011 attrib = PyDict_New(); in expat_start_handler()
3012 if (!attrib) { in expat_start_handler()
3022 Py_DECREF(attrib); in expat_start_handler()
3026 ok = PyDict_SetItem(attrib, key, value); in expat_start_handler()
3030 Py_DECREF(attrib); in expat_start_handler()
3038 attrib = Py_None; in expat_start_handler()
3044 tag, attrib); in expat_start_handler()
3047 if (attrib == Py_None) { in expat_start_handler()
3048 Py_DECREF(attrib); in expat_start_handler()
3049 attrib = PyDict_New(); in expat_start_handler()
3050 if (!attrib) { in expat_start_handler()
3056 tag, attrib, NULL); in expat_start_handler()
3061 Py_DECREF(attrib); in expat_start_handler()