GH-96803: Document and test new unstable internal frame API functions (GH-104211)

Weaken contract of PyUnstable_InterpreterFrame_GetCode to return PyObject*.
This commit is contained in:
Mark Shannon 2023-05-18 10:10:15 +01:00 committed by GitHub
parent 68b5f08b72
commit cfa517d5a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 98 additions and 3 deletions

View file

@ -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;
}