Kaydet (Commit) 12ce485b authored tarafından Jeremy Hylton's avatar Jeremy Hylton

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

üst ccae8377
...@@ -46,6 +46,7 @@ typedef struct { ...@@ -46,6 +46,7 @@ typedef struct {
extern DL_IMPORT(PyTypeObject) PyCode_Type; extern DL_IMPORT(PyTypeObject) PyCode_Type;
#define PyCode_Check(op) ((op)->ob_type == &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 */ #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment