summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-02-19 15:53:17 (GMT)
committerGuido van Rossum <guido@python.org>2003-02-19 15:53:17 (GMT)
commit6297a7a9fbf7675bf23a9b5aa822ed5aaec19647 (patch)
tree39464e145aa29a7b507fb3b9f080841e3f8f00e0 /Include
parent162e38c6a312aa3e9c353419301087a4620c513c (diff)
downloadcpython-6297a7a9fbf7675bf23a9b5aa822ed5aaec19647.zip
cpython-6297a7a9fbf7675bf23a9b5aa822ed5aaec19647.tar.gz
cpython-6297a7a9fbf7675bf23a9b5aa822ed5aaec19647.tar.bz2
- PyEval_GetFrame() is now declared to return a PyFrameObject *
instead of a plain PyObject *. (SF patch #686601 by Ben Laurie.)
Diffstat (limited to 'Include')
-rw-r--r--Include/ceval.h4
-rw-r--r--Include/pystate.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/Include/ceval.h b/Include/ceval.h
index 9bb145d..8d0ca9e 100644
--- a/Include/ceval.h
+++ b/Include/ceval.h
@@ -25,11 +25,13 @@ PyAPI_FUNC(PyObject *) PyEval_CallMethod(PyObject *obj,
PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *);
PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *);
+struct _frame; /* Avoid including frameobject.h */
+
PyAPI_FUNC(PyObject *) PyEval_GetBuiltins(void);
PyAPI_FUNC(PyObject *) PyEval_GetGlobals(void);
PyAPI_FUNC(PyObject *) PyEval_GetLocals(void);
PyAPI_FUNC(PyObject *) PyEval_GetOwner(void);
-PyAPI_FUNC(PyObject *) PyEval_GetFrame(void);
+PyAPI_FUNC(struct _frame *) PyEval_GetFrame(void);
PyAPI_FUNC(int) PyEval_GetRestricted(void);
/* Look at the current frame's (if any) code's co_flags, and turn on
diff --git a/Include/pystate.h b/Include/pystate.h
index d4233bf..3e5b5b4 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -107,8 +107,10 @@ PyAPI_FUNC(PyInterpreterState *) PyInterpreterState_Next(PyInterpreterState *);
PyAPI_FUNC(PyThreadState *) PyInterpreterState_ThreadHead(PyInterpreterState *);
PyAPI_FUNC(PyThreadState *) PyThreadState_Next(PyThreadState *);
+typedef struct _frame *(*PyThreadFrameGetter)(PyThreadState *self_);
+
/* hook for PyEval_GetFrame(), requested for Psyco */
-PyAPI_DATA(unaryfunc) _PyThreadState_GetFrame;
+PyAPI_DATA(PyThreadFrameGetter) _PyThreadState_GetFrame;
#ifdef __cplusplus
}