On May 12, 2010, at 5:44 PM, Dan Roberts wrote:
> While we're talking about this sort of thing, in Cython/Compiler/ 
> ModuleNode.py around line 1073 ++Py_REFCNT(o) and --Py_REFCNT(o) are  
> generated than Py_INCREF(o) and Py_DECREF(o) respectively.  I  
> realize it may not be desirable for some reason that I'm unaware of,  
> so I'll leave it up to you guys to change at your discretion.
>
Py_DECREF checks to see if the refcount is 0 and if so invokes the  
deallocation methods. This is in the deallocation method, so we  
wouldn't want that. (The refcount is temporarily bumped up so that it  
doesn't go to 0 while executing the body of the function.)

> Cheers,
> Dan
>
> P.S. What would be the ideal way for me to contribute things back in  
> the future?  With a bitbucket account maybe?
>
Yes, that would work well. You could also post patches to 
http://trac.cython.org/cython_trac 
  (just send one of us an htpasswd entry offlist for an account).

>
>>
>> >
>> > On May 9, 2010 3:49 AM, "Stefan Behnel" <[email protected]>  
>> wrote:
>> >
>> > Dan Roberts, 09.05.201...
>>
>>
>> >
>> > > The code that Cython generates for numpy/random/mtrand/ 
>> mtrand.pyx contains
>>
>> > several __Pyx_*() fun...
>>
>>
>> >
>> > Well, it's not an object, first of all, but IMHO, it's pretty  
>> much standard
>> > for CPython. And ...
>>
>>
>> >
>> >
>> >
>> > > but each seems to have a sanctioned equivalent
>> > > provided in the official C API, listed ...
>>
>> > ...
>>
>>
>> >
>> > I think "seems" is the right word here. They are either not exactly
>> > equivalent or have CPytho...
>>
>>
>> >
>> >
>> >
>> > > This is important because non-CPython interpreters likely won't  
>> expose that
>>
>> > struct, and indeed...
>>
>>
>> >
>> > I don't expect much Cython code to run on PyPy anyway. The  
>> exception
>> > handling is only one rea...
>>
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev

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

Reply via email to