[Python-Dev] FS: [issue9141] Allow objects to decide if they can be collected by GC
Kristján Valur Jónsson
kristjan at ccpgames.com
Thu Apr 5 13:58:38 CEST 2012
Hi there. Antoine Pitrou suggested that I float this on python-dev again. The new patch should
1) be much simpler and less hacky
2) remove the special case code for PyGenObject from gcmodule.c
K
________________________________________
Frá: Kristján Valur Jónsson [report at bugs.python.org]
Sent: 5. apríl 2012 11:55
To: Kristján Valur Jónsson
Efni: [issue9141] Allow objects to decide if they can be collected by GC
Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:
Here is a completely new patch. This approach uses the already existing tp_is_gc enquiry slot to signal garbage collection.
The patch modifies the generator object to use this new mechanism.
The patch keeps the old PyGen_NeedsFinalizing() API, but this can now go away, unless people think it might be used in extension modules
(why do we always expose all those internal apis from the dll? I wonder.)
----------
Added file: http://bugs.python.org/file25131/ob_is_gc.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9141>
_______________________________________
More information about the Python-Dev
mailing list