xref: /third_party/python/Include/pyframe.h (revision 7db96d56)
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
9extern "C" {
10#endif
11
12/* Return the line of code the frame is currently executing. */
13PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *);
14
15PyAPI_FUNC(PyCodeObject *) PyFrame_GetCode(PyFrameObject *frame);
16
17#ifndef Py_LIMITED_API
18#  define Py_CPYTHON_PYFRAME_H
19#  include "cpython/pyframe.h"
20#  undef Py_CPYTHON_PYFRAME_H
21#endif
22
23#ifdef __cplusplus
24}
25#endif
26#endif /* !Py_PYFRAME_H */
27