[Python-checkins] python/dist/src/Python compile.c,2.267,2.268
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Tue, 17 Dec 2002 17:18:47 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv31769/Python
Modified Files:
compile.c
Log Message:
SF # 654960, remove unnecessary static variable
The static variable (implicit) was not necessary.
The c_globals can be None or True now.
Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.267
retrieving revision 2.268
diff -C2 -d -r2.267 -r2.268
*** compile.c 16 Dec 2002 13:54:02 -0000 2.267
--- compile.c 18 Dec 2002 01:18:44 -0000 2.268
***************
*** 457,461 ****
PyObject *c_names; /* list of strings (names) */
PyObject *c_name_dict; /* inverse of c_names */
! PyObject *c_globals; /* dictionary (value=None) */
PyObject *c_locals; /* dictionary (value=localID) */
PyObject *c_varnames; /* list (inverse of c_locals) */
--- 457,461 ----
PyObject *c_names; /* list of strings (names) */
PyObject *c_name_dict; /* inverse of c_names */
! PyObject *c_globals; /* dictionary (value=None or True) */
PyObject *c_locals; /* dictionary (value=localID) */
PyObject *c_varnames; /* list (inverse of c_locals) */
***************
*** 4659,4663 ****
symtable_load_symbols(struct compiling *c)
{
- static PyObject *implicit = NULL;
struct symtable *st = c->c_symtable;
PySymtableEntryObject *ste = st->st_cur;
--- 4659,4662 ----
***************
*** 4666,4674 ****
struct symbol_info si;
- if (implicit == NULL) {
- implicit = PyInt_FromLong(1);
- if (implicit == NULL)
- return -1;
- }
v = NULL;
--- 4665,4668 ----
***************
*** 4727,4731 ****
} else if (flags & DEF_FREE_GLOBAL) {
si.si_nimplicit++;
! if (PyDict_SetItem(c->c_globals, name, implicit) < 0)
goto fail;
} else if ((flags & DEF_LOCAL) && !(flags & DEF_PARAM)) {
--- 4721,4725 ----
} else if (flags & DEF_FREE_GLOBAL) {
si.si_nimplicit++;
! if (PyDict_SetItem(c->c_globals, name, Py_True) < 0)
goto fail;
} else if ((flags & DEF_LOCAL) && !(flags & DEF_PARAM)) {
***************
*** 4750,4754 ****
si.si_nimplicit++;
if (PyDict_SetItem(c->c_globals, name,
! implicit) < 0)
goto fail;
if (st->st_nscopes != 1) {
--- 4744,4748 ----
si.si_nimplicit++;
if (PyDict_SetItem(c->c_globals, name,
! Py_True) < 0)
goto fail;
if (st->st_nscopes != 1) {