Author martin.panter
Recipients brett.cannon, martin.panter, scoder, serhiy.storchaka
Date 2015-12-16.00:47:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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]
Date User Action Args
2015-12-16 00:47:37martin.pantersetrecipients: + martin.panter, brett.cannon, scoder, serhiy.storchaka
2015-12-16 00:47:37martin.pantersetmessageid: <>
2015-12-16 00:47:37martin.panterlinkissue25873 messages
2015-12-16 00:47:36martin.pantercreate