+++ /dev/null
-\r
-/* Frame object interface */\r
-\r
-#ifndef Py_FRAMEOBJECT_H\r
-#define Py_FRAMEOBJECT_H\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-typedef struct {\r
- int b_type; /* what kind of block this is */\r
- int b_handler; /* where to jump to find handler */\r
- int b_level; /* value stack level to pop to */\r
-} PyTryBlock;\r
-\r
-typedef struct _frame {\r
- PyObject_VAR_HEAD\r
- struct _frame *f_back; /* previous frame, or NULL */\r
- PyCodeObject *f_code; /* code segment */\r
- PyObject *f_builtins; /* builtin symbol table (PyDictObject) */\r
- PyObject *f_globals; /* global symbol table (PyDictObject) */\r
- PyObject *f_locals; /* local symbol table (any mapping) */\r
- PyObject **f_valuestack; /* points after the last local */\r
- /* Next free slot in f_valuestack. Frame creation sets to f_valuestack.\r
- Frame evaluation usually NULLs it, but a frame that yields sets it\r
- to the current stack top. */\r
- PyObject **f_stacktop;\r
- PyObject *f_trace; /* Trace function */\r
-\r
- /* If an exception is raised in this frame, the next three are used to\r
- * record the exception info (if any) originally in the thread state. See\r
- * comments before set_exc_info() -- it's not obvious.\r
- * Invariant: if _type is NULL, then so are _value and _traceback.\r
- * Desired invariant: all three are NULL, or all three are non-NULL. That\r
- * one isn't currently true, but "should be".\r
- */\r
- PyObject *f_exc_type, *f_exc_value, *f_exc_traceback;\r
-\r
- PyThreadState *f_tstate;\r
- int f_lasti; /* Last instruction if called */\r
- /* Call PyFrame_GetLineNumber() instead of reading this field\r
- directly. As of 2.3 f_lineno is only valid when tracing is\r
- active (i.e. when f_trace is set). At other times we use\r
- PyCode_Addr2Line to calculate the line from the current\r
- bytecode index. */\r
- int f_lineno; /* Current line number */\r
- int f_iblock; /* index in f_blockstack */\r
- PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */\r
- PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */\r
-} PyFrameObject;\r
-\r
-\r
-/* Standard object interface */\r
-\r
-PyAPI_DATA(PyTypeObject) PyFrame_Type;\r
-\r
-#define PyFrame_Check(op) ((op)->ob_type == &PyFrame_Type)\r
-#define PyFrame_IsRestricted(f) \\r
- ((f)->f_builtins != (f)->f_tstate->interp->builtins)\r
-\r
-PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *,\r
- PyObject *, PyObject *);\r
-\r
-\r
-/* The rest of the interface is specific for frame objects */\r
-\r
-/* Block management functions */\r
-\r
-PyAPI_FUNC(void) PyFrame_BlockSetup(PyFrameObject *, int, int, int);\r
-PyAPI_FUNC(PyTryBlock *) PyFrame_BlockPop(PyFrameObject *);\r
-\r
-/* Extend the value stack */\r
-\r
-PyAPI_FUNC(PyObject **) PyFrame_ExtendStack(PyFrameObject *, int, int);\r
-\r
-/* Conversions between "fast locals" and locals in dictionary */\r
-\r
-PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int);\r
-PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *);\r
-\r
-PyAPI_FUNC(int) PyFrame_ClearFreeList(void);\r
-\r
-/* Return the line of code the frame is currently executing. */\r
-PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *);\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-#endif /* !Py_FRAMEOBJECT_H */\r