summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-05-18 09:10:15 (GMT)
committerGitHub <noreply@github.com>2023-05-18 09:10:15 (GMT)
commitcfa517d5a68bae24cbe8d9fe6b8e0d4935e507d2 (patch)
treec25c67c7ba5b46b22884fc04f62b4429443c99e5 /Python
parent68b5f08b72e02f62ec787bfbb7aa99bac661daec (diff)
downloadcpython-cfa517d5a68bae24cbe8d9fe6b8e0d4935e507d2.zip
cpython-cfa517d5a68bae24cbe8d9fe6b8e0d4935e507d2.tar.gz
cpython-cfa517d5a68bae24cbe8d9fe6b8e0d4935e507d2.tar.bz2
GH-96803: Document and test new unstable internal frame API functions (GH-104211)
Weaken contract of PyUnstable_InterpreterFrame_GetCode to return PyObject*.
Diffstat (limited to 'Python')
-rw-r--r--Python/frame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/frame.c b/Python/frame.c
index d792b92..b84fd9b 100644
--- a/Python/frame.c
+++ b/Python/frame.c
@@ -146,10 +146,10 @@ _PyFrame_ClearExceptCode(_PyInterpreterFrame *frame)
/* Unstable API functions */
-PyCodeObject *
+PyObject *
PyUnstable_InterpreterFrame_GetCode(struct _PyInterpreterFrame *frame)
{
- PyCodeObject *code = frame->f_code;
+ PyObject *code = (PyObject *)frame->f_code;
Py_INCREF(code);
return code;
}