Add helper macro to get the number of free variables for a PyCodeObject.

This commit is contained in:
Jeremy Hylton 2001-12-13 19:47:02 +00:00
parent ccae8377a3
commit 12ce485b48
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ typedef struct {
extern DL_IMPORT(PyTypeObject) PyCode_Type;
#define PyCode_Check(op) ((op)->ob_type == &PyCode_Type)
#define PyCode_GetNumFree(op) (PyTuple_GET_SIZE((op)->co_freevars))
#define CO_MAXBLOCKS 20 /* Max static block nesting within a function */