[Pyrex] Creating a Non-GC type

Lenard Lindstrom len-l at telus.net
Sat Oct 3 04:49:05 CEST 2009


Greg Ewing wrote:
> John Arbash Meinel wrote:
>> I haven't found any way to tell pyrex not to set the "HAVE_GC"
>> flag. From what I can tell, the code says "if you have any attributes,
>> then you must HAVE_GC".
>
> Yes, there's currently no way to turn that off, although
> I could look into providing an option for it somehow.
>
If the HAVE_GC flag is only set for object attributes, then couldn't 
PyObject* (or void*) C attributes be used instead? It would mean 
explicit Py_INCREF and Py_DECREF calls, but that is already required in 
the C version of the "tuple" module. This could be an interim solution 
until an HAVE_GC switch is provided.

Lenard Lindstrom





More information about the Pyrex mailing list