On May 22, 2008, at 7:04 PM, Greg Ewing wrote: > Robert Bradshaw wrote: >> At the end of the function, t is deallocated... You need to manually >> Py_INCREF(t) > > Rather than manually increfing and decrefing, I'd recommend > keeping an ordinary reference somewhere that you know will > stay alive long enough, as it will be much less error prone. > Manual refcounting should only be used as a last resort.
Yes, this is a much better way of keeping track of things. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
