frameobject.c bug ? No call to PyFrame_LocalsToFast.
Boris Boutillier
boris at cantal.lip6.fr
Thu Apr 11 06:44:19 EDT 2002
I've been looking through the frameObject.c code and looked for what
happened, and surprised, there is no call to PyFrame_LocalsToFast when a
frame is created, so if f_locals isn't empty (which can be the case if
CO_NEWLOCALS is set to 0 the fast access values aren't initialised ).
Is there a reason for this ?
For the moment I've added a line:
> PyFrame_LocalsToFast(f,0);
just before line 261 :
261> _PyObject_GC_TRACK(f);
This change allow to create codeobject without CO_NEWLOCALS that really
can be initialised with a local dictionnary. Before that as f_localsplus
wasn't initialised, CO_NEWLOCALS was a useless flag, this was as if it
was always set to 1.
Boris
More information about the Python-list
mailing list