[Python-checkins] CVS: python/dist/src/Modules newmodule.c,2.29,2.30 pyexpat.c,2.35,2.36
Jeremy Hylton
jhylton@users.sourceforge.net
Thu, 25 Jan 2001 12:07:58 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv24284/Modules
Modified Files:
newmodule.c pyexpat.c
Log Message:
PEP 227 implementation
Track changes to PyFrame_New() and PyFuntion_New().
Index: newmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/newmodule.c,v
retrieving revision 2.29
retrieving revision 2.30
diff -C2 -r2.29 -r2.30
*** newmodule.c 2000/11/13 20:29:20 2.29
--- newmodule.c 2001/01/25 20:07:56 2.30
***************
*** 102,106 ****
static char new_code_doc[] =
! "Create a code object from (ARGCOUNT, NLOCALS, STACKSIZE, FLAGS, CODESTRING, CONSTANTS, NAMES, VARNAMES, FILENAME, NAME, FIRSTLINENO, LNOTAB).";
static PyObject *
--- 102,106 ----
static char new_code_doc[] =
! "Create a code object from (ARGCOUNT, NLOCALS, STACKSIZE, FLAGS, CODESTRING, CONSTANTS, NAMES, VARNAMES, FREEVARS, CELLVARS, FILENAME, NAME, FIRSTLINENO, LNOTAB).";
static PyObject *
***************
*** 115,118 ****
--- 115,120 ----
PyObject* names;
PyObject* varnames;
+ PyObject* freevars;
+ PyObject* cellvars;
PyObject* filename;
PyObject* name;
***************
*** 121,125 ****
PyBufferProcs *pb;
! if (!PyArg_ParseTuple(args, "iiiiOO!O!O!SSiS:code",
&argcount, &nlocals, &stacksize, &flags,
&code,
--- 123,127 ----
PyBufferProcs *pb;
! if (!PyArg_ParseTuple(args, "iiiiOO!O!O!O!O!SSiS:code",
&argcount, &nlocals, &stacksize, &flags,
&code,
***************
*** 127,130 ****
--- 129,134 ----
&PyTuple_Type, &names,
&PyTuple_Type, &varnames,
+ &PyTuple_Type, &freevars,
+ &PyTuple_Type, &cellvars,
&filename, &name,
&firstlineno, &lnotab))
***************
*** 144,148 ****
return (PyObject *)PyCode_New(argcount, nlocals, stacksize, flags,
code, consts, names, varnames,
! filename, name, firstlineno, lnotab);
}
--- 148,153 ----
return (PyObject *)PyCode_New(argcount, nlocals, stacksize, flags,
code, consts, names, varnames,
! freevars, cellvars, filename, name,
! firstlineno, lnotab);
}
Index: pyexpat.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v
retrieving revision 2.35
retrieving revision 2.36
diff -C2 -r2.35 -r2.36
*** pyexpat.c 2001/01/22 08:19:10 2.35
--- pyexpat.c 2001/01/25 20:07:56 2.36
***************
*** 258,261 ****
--- 258,263 ----
nulltuple, /* names */
nulltuple, /* varnames */
+ nulltuple, /* freevars */
+ nulltuple, /* cellvars */
filename, /* filename */
name, /* name */
***************
*** 289,293 ****
c, /*code*/
tstate->frame->f_globals, /*globals*/
! NULL); /*locals*/
if (f == NULL)
return NULL;
--- 291,297 ----
c, /*code*/
tstate->frame->f_globals, /*globals*/
! NULL, /*locals*/
! 0,
! NULL); /* closure */
if (f == NULL)
return NULL;