Re: Creating a Non-GC type
Lenard Lindstrom <[email protected]> Fri, 02 Oct 2009 19:49:05 -0700
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
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