[Cython] Stefan, please fix this

Stefan Behnel stefan_ml at behnel.de
Tue Feb 24 09:38:18 CET 2009


Lisandro Dalcin wrote:
> +        for entry in env.default_entries:
> +            if entry.type.is_pyobject and entry.used:
> -                code.putln("Py_DECREF(%s); %s = 0;" % (
> -                        code.entry_as_pyobject(entry), entry.cname))
> +                code.put_var_decref_clear(entry)
>
> Please revert to my implementation (bare Py_DECREF and nullify), or
> any other that does not break C compilation... IMHO, The module
> cleanup function is not a place to play with refnanny. Moreover, the
> module cleanup funcion is not refnanny-managed...

I agree.


> BTW, I believe that cleanup code should be generated when running the
> testsuite...

I'd even go one step further.

http://trac.cython.org/cython_trac/ticket/218

Stefan



More information about the Cython-dev mailing list