summaryrefslogtreecommitdiff
path: root/Modules/newmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-01-17 21:12:06 +0000
committerGuido van Rossum <guido@python.org>1997-01-17 21:12:06 +0000
commitab1a3f2a4ccd17c28426723304b84ca4198db388 (patch)
treee678aa9ccec2e8a3799d5c98d8dc4b4424783c97 /Modules/newmodule.c
parent30ea6e5a42ec910cc8b5ccb108b6751241200c76 (diff)
downloadcpython-ab1a3f2a4ccd17c28426723304b84ca4198db388.tar.gz
Add stacksize argument to new.code().
Diffstat (limited to 'Modules/newmodule.c')
-rw-r--r--Modules/newmodule.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Modules/newmodule.c b/Modules/newmodule.c
index f012e64be2..6d7b34f678 100644
--- a/Modules/newmodule.c
+++ b/Modules/newmodule.c
@@ -119,7 +119,7 @@ new_function(unused, args)
}
static char new_code_doc[] =
-"Create a code object from (ARGCOUNT, NLOCALS, FLAGS, CODESTRING, CONSTANTS, NAMES, VARNAMES, FILENAME, NAME).";
+"Create a code object from (ARGCOUNT, NLOCALS, STACKSIZE, FLAGS, CODESTRING, CONSTANTS, NAMES, VARNAMES, FILENAME, NAME).";
static PyObject *
new_code(unused, args)
@@ -128,6 +128,7 @@ new_code(unused, args)
{
int argcount;
int nlocals;
+ int stacksize;
int flags;
PyObject* code;
PyObject* consts;
@@ -136,15 +137,15 @@ new_code(unused, args)
PyObject* filename;
PyObject* name;
- if (!PyArg_ParseTuple(args, "iiiSO!O!O!SS",
- &argcount, &nlocals, &flags, /* These are new */
+ if (!PyArg_ParseTuple(args, "iiiiSO!O!O!SS",
+ &argcount, &nlocals, &stacksize, &flags,
&code,
&PyTuple_Type, &consts,
&PyTuple_Type, &names,
- &PyTuple_Type, &varnames, /* These are new */
+ &PyTuple_Type, &varnames,
&filename, &name))
return NULL;
- return (PyObject *)PyCode_New(argcount, nlocals, flags,
+ return (PyObject *)PyCode_New(argcount, nlocals, stacksize, flags,
code, consts, names, varnames,
filename, name);
}