diff options
author | Guido van Rossum <guido@python.org> | 1997-01-17 20:59:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-01-17 20:59:26 (GMT) |
commit | 3f6e408a31208d29cf867bb30496bdb1f863d310 (patch) | |
tree | 24dd608f5d0dc3280253b81c786610c500cd3930 | |
parent | 00f86e6086444b94653d0fb01f2fa18e9a24f59a (diff) | |
download | cpython-3f6e408a31208d29cf867bb30496bdb1f863d310.zip cpython-3f6e408a31208d29cf867bb30496bdb1f863d310.tar.gz cpython-3f6e408a31208d29cf867bb30496bdb1f863d310.tar.bz2 |
Add co_stacksize field to codeobject structure, and stacksize argument
to PyCode_New() argument list. Also add CO_MAXBLOCKS constant
indicating the maximum static nesting supported by the compiler.
-rw-r--r-- | Include/compile.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/compile.h b/Include/compile.h index 831e5dd..9be5c85 100644 --- a/Include/compile.h +++ b/Include/compile.h @@ -42,6 +42,7 @@ typedef struct { PyObject_HEAD int co_argcount; /* #arguments, except *args */ int co_nlocals; /* #local variables */ + int co_stacksize; /* #entries needed for evaluation stack */ int co_flags; /* CO_..., see below */ PyStringObject *co_code; /* instruction opcodes */ PyObject *co_consts; /* list (constants used) */ @@ -62,12 +63,13 @@ extern DL_IMPORT(PyTypeObject) PyCode_Type; #define PyCode_Check(op) ((op)->ob_type == &PyCode_Type) +#define CO_MAXBLOCKS 20 /* Max static block nesting within a function */ /* Public interface */ struct _node; /* Declare the existence of this type */ PyCodeObject *PyNode_Compile Py_PROTO((struct _node *, char *)); PyCodeObject *PyCode_New Py_PROTO(( - int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, + int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *)); /* same as struct above */ #ifdef __cplusplus |