[Pyrex] Missing Py_DECREF in generated code

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Dec 2 02:24:16 UTC 2006


Igor Khavkine wrote:

> That's somewhat misleading. Each line in my example, except the
> indicated one, produces correct code.

Yes, but that's more by accident than by design.
It's not always clear what's the "right" thing to
do with reference counts when casting to or from a
Python reference.

I'll look into this case and see whether anything
can be done to improve matters, but I can't guarantee
I'll be able to fix it without breaking some other
usage.

Probably I should add a note to the docs about this.
I thought I had already mentioned it somewhere, but
it seems not.

--
Greg



More information about the Pyrex mailing list