diff options
Diffstat (limited to 'Include/cpython')
| -rw-r--r-- | Include/cpython/ceval.h | 2 | ||||
| -rw-r--r-- | Include/cpython/frameobject.h | 7 | ||||
| -rw-r--r-- | Include/cpython/pystate.h | 6 | ||||
| -rw-r--r-- | Include/cpython/traceback.h | 2 |
4 files changed, 7 insertions, 10 deletions
diff --git a/Include/cpython/ceval.h b/Include/cpython/ceval.h index 020f78712f..e1922a677b 100644 --- a/Include/cpython/ceval.h +++ b/Include/cpython/ceval.h @@ -23,7 +23,7 @@ PyAPI_FUNC(PyObject *) _PyEval_GetBuiltinId(_Py_Identifier *); flag was set, else return 0. */ PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf); -PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _frame *f, int exc); +PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int exc); PyAPI_FUNC(void) _PyEval_SetSwitchInterval(unsigned long microseconds); PyAPI_FUNC(unsigned long) _PyEval_GetSwitchInterval(void); diff --git a/Include/cpython/frameobject.h b/Include/cpython/frameobject.h index 4ced96746a..e819cefd13 100644 --- a/Include/cpython/frameobject.h +++ b/Include/cpython/frameobject.h @@ -14,7 +14,7 @@ typedef struct { int b_level; /* value stack level to pop to */ } PyTryBlock; -typedef struct _frame { +struct _frame { PyObject_VAR_HEAD struct _frame *f_back; /* previous frame, or NULL */ PyCodeObject *f_code; /* code segment */ @@ -44,7 +44,7 @@ typedef struct _frame { char f_executing; /* whether the frame is still executing */ PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */ PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */ -} PyFrameObject; +}; /* Standard object interface */ @@ -79,9 +79,6 @@ PyAPI_FUNC(int) PyFrame_ClearFreeList(void); PyAPI_FUNC(void) _PyFrame_DebugMallocStats(FILE *out); -/* Return the line of code the frame is currently executing. */ -PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *); - #ifdef __cplusplus } #endif diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h index 9b28f66fdb..f292da1d3c 100644 --- a/Include/cpython/pystate.h +++ b/Include/cpython/pystate.h @@ -16,7 +16,7 @@ PyAPI_FUNC(PyObject *) _PyInterpreterState_GetMainModule(PyInterpreterState *); /* State unique per thread */ /* Py_tracefunc return -1 when raising an exception, or 0 for success. */ -typedef int (*Py_tracefunc)(PyObject *, struct _frame *, int, PyObject *); +typedef int (*Py_tracefunc)(PyObject *, PyFrameObject *, int, PyObject *); /* The following values are used for 'what' for tracefunc functions * @@ -56,7 +56,7 @@ struct _ts { PyInterpreterState *interp; /* Borrowed reference to the current frame (it can be NULL) */ - struct _frame *frame; + PyFrameObject *frame; int recursion_depth; char overflowed; /* The stack has overflowed. Allow 50 more calls to handle the runtime error. */ @@ -184,7 +184,7 @@ PyAPI_FUNC(void) PyThreadState_DeleteCurrent(void); /* Frame evaluation API */ -typedef PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, struct _frame *, int); +typedef PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, PyFrameObject *, int); PyAPI_FUNC(_PyFrameEvalFunction) _PyInterpreterState_GetEvalFrameFunc( PyInterpreterState *interp); diff --git a/Include/cpython/traceback.h b/Include/cpython/traceback.h index 746097daaf..837470c3ba 100644 --- a/Include/cpython/traceback.h +++ b/Include/cpython/traceback.h @@ -9,7 +9,7 @@ extern "C" { typedef struct _traceback { PyObject_HEAD struct _traceback *tb_next; - struct _frame *tb_frame; + PyFrameObject *tb_frame; int tb_lasti; int tb_lineno; } PyTracebackObject; |
