On May 14, 2010, at 7:21 AM, Lisandro Dalcin wrote:

> On 14 May 2010 00:43, Dan Roberts <[email protected]> wrote:
>> It seems like the only way to make this work is to Py_INCREF() but  
>> don't
>> decref, the CPython guys I talked to seem to think this is ok  
>> because we
>> always tp_free and tp_free shouldn't resurrect. If you guys know of  
>> a reason
>> why this solution won't work, I'd like to know why.
>
> If you do not call Py_DECREF, then you will be in charge of
> decrementing the various reference counter tracking mechanisms, like
> _Py_RefTotal global counter, and inc_count(PyTypeObject
> *)/dec_count(PyTypeObject *)

Good point, this is starting to sound really messy (possibly even more  
invasive and fragile than reaching into Py_REFCNT). It might be better  
to conditionally incref/decref this slot (if we're not compiling  
against CPython)?

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to