Martin Panter added the comment:
Looks technically correct as far as my knowledge of the malloc routines goes.
What was the problem with references that you fixed? Maybe with
parent_stack_push_new() failure?
The main reference counting bug that sticks out to me is with the text and tail
elements, because element_get_text() etc return a borrowed reference. It might
be good to fix this while you are at it:
>>> element = Element("tag")
>>> class Text:
... def __bool__(self):
... element.text = "changed"
... return True
...
>>> element.text = Text()
>>> i = element.itertext()
>>> next(i)
Segmentation fault (core dumped)
[Exit 139]
----------
components: +XML
nosy: +martin.panter
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25873>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com