Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment:

I was going to say that the patch has no visible effect, since 
PyObject_GC_Del() calls something which has the same effect as 
PyObject_GC_Untrack...
But the following code crashes the interpreter! And of course the patch fixes 
it...


import ctypes, gc
class Nasty:
    def __del__(self):
        gc.collect()

ctypes.CFUNCTYPE(None)(lambda x=Nasty(): None)
print("OK")

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12483>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to