On 20 June 2010 09:49, Stefan Behnel <[email protected]> wrote:
>
> Actually, it would be even better to do this instead:
>
>     Pyx_INCREF(arg1);
>     temp = scope->v1;
>     scope->v1 = arg1;
>     Pyx_DECREF(temp);
>     Pyx_GIVEREF(arg1);
>
> as DECREF(scope->v1) can run arbitrary code that may involve traversing the
> references stored in "scope", including the reference in "scope->v1".
>

BTW, Shouldn't we use Py_CLEAR that at ExtType_tp_free() slots?

-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to