Victor Stinner | 7c59d7c | 2020-04-28 16:32:48 +0200 | [diff] [blame] | 1 | /* Limited C API of PyFrame API |
| 2 | * |
| 3 | * Include "frameobject.h" to get the PyFrameObject structure. |
| 4 | */ |
| 5 | |
| 6 | #ifndef Py_PYFRAME_H |
| 7 | #define Py_PYFRAME_H |
| 8 | #ifdef __cplusplus |
| 9 | extern "C" { |
| 10 | #endif |
| 11 | |
| 12 | typedef struct _frame PyFrameObject; |
| 13 | |
| 14 | /* Return the line of code the frame is currently executing. */ |
| 15 | PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *); |
| 16 | |
Victor Stinner | a42ca74 | 2020-04-28 19:01:31 +0200 | [diff] [blame] | 17 | PyAPI_FUNC(PyCodeObject *) PyFrame_GetCode(PyFrameObject *frame); |
| 18 | |
Victor Stinner | 7c59d7c | 2020-04-28 16:32:48 +0200 | [diff] [blame] | 19 | #ifdef __cplusplus |
| 20 | } |
| 21 | #endif |
| 22 | #endif /* !Py_PYFRAME_H */ |