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. Otherwise that's how I'm going to proceed with this issue. I'll put up a bitbucket repository as soon as school is out, and hopefully some of the code will be acceptable to you :-)
Thanks for your patience, Dan On May 13, 2010 2:18 AM, "Dan Roberts" <[email protected]> wrote: Egh, yep you guys are right again. In this case the only thing I can think of is to just forego the --Py_REFCNT(o) line altogether, which should work, and shouldn't affect the execution of the program at all. (That is... unless tp_free checks the refcount, which may be...) Even if it wouldn't affect anything, it still would make me feel a bit dirty... > > On May 13, 2010 1:05 AM, "Dag Sverre Seljebotn" < [email protected]> wrote: > > Dan Roberts wrote: > > > > Thanks for the reply. Of course you're right, Py_DECREF() might cause > inf... > > If this is what I'm thinking it is: > > def printsomething(x): > y = x # incref from 0 to 1 ... > > >> wrote: > >> > >> On May 12, 2010, at 5:44 PM, Dan Roberts wrote: >> > While we're talking about this ... > > >> <mailto:[email protected]>> >> >> wrote: >> >> > >> >> > ... >> >> > _______________________________________________ >> > Cython... > > > ------------------------------------------------------------------------ > > > > ____________...
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
