summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/frameobject.h13
-rw-r--r--Include/cpython/pyframe.h17
-rw-r--r--Include/pyframe.h6
3 files changed, 23 insertions, 13 deletions
diff --git a/Include/cpython/frameobject.h b/Include/cpython/frameobject.h
index 9cd711e..4e19535 100644
--- a/Include/cpython/frameobject.h
+++ b/Include/cpython/frameobject.h
@@ -6,10 +6,6 @@
/* Standard object interface */
-PyAPI_DATA(PyTypeObject) PyFrame_Type;
-
-#define PyFrame_Check(op) Py_IS_TYPE(op, &PyFrame_Type)
-
PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *,
PyObject *, PyObject *);
@@ -31,12 +27,3 @@ PyAPI_FUNC(int) _PyFrame_IsEntryFrame(PyFrameObject *frame);
PyAPI_FUNC(int) PyFrame_FastToLocalsWithError(PyFrameObject *f);
PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *);
-
-PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame);
-PyAPI_FUNC(PyObject *) PyFrame_GetLocals(PyFrameObject *frame);
-
-PyAPI_FUNC(PyObject *) PyFrame_GetGlobals(PyFrameObject *frame);
-PyAPI_FUNC(PyObject *) PyFrame_GetBuiltins(PyFrameObject *frame);
-
-PyAPI_FUNC(PyObject *) PyFrame_GetGenerator(PyFrameObject *frame);
-PyAPI_FUNC(int) PyFrame_GetLasti(PyFrameObject *frame);
diff --git a/Include/cpython/pyframe.h b/Include/cpython/pyframe.h
new file mode 100644
index 0000000..1dc634c
--- /dev/null
+++ b/Include/cpython/pyframe.h
@@ -0,0 +1,17 @@
+#ifndef Py_CPYTHON_PYFRAME_H
+# error "this header file must not be included directly"
+#endif
+
+PyAPI_DATA(PyTypeObject) PyFrame_Type;
+
+#define PyFrame_Check(op) Py_IS_TYPE((op), &PyFrame_Type)
+
+PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame);
+PyAPI_FUNC(PyObject *) PyFrame_GetLocals(PyFrameObject *frame);
+
+PyAPI_FUNC(PyObject *) PyFrame_GetGlobals(PyFrameObject *frame);
+PyAPI_FUNC(PyObject *) PyFrame_GetBuiltins(PyFrameObject *frame);
+
+PyAPI_FUNC(PyObject *) PyFrame_GetGenerator(PyFrameObject *frame);
+PyAPI_FUNC(int) PyFrame_GetLasti(PyFrameObject *frame);
+
diff --git a/Include/pyframe.h b/Include/pyframe.h
index feac16f..13d5231 100644
--- a/Include/pyframe.h
+++ b/Include/pyframe.h
@@ -14,6 +14,12 @@ PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *);
PyAPI_FUNC(PyCodeObject *) PyFrame_GetCode(PyFrameObject *frame);
+#ifndef Py_LIMITED_API
+# define Py_CPYTHON_PYFRAME_H
+# include "cpython/pyframe.h"
+# undef Py_CPYTHON_PYFRAME_H
+#endif
+
#ifdef __cplusplus
}
#endif