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

@ -35,7 +35,7 @@ PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *);
/* Returns the code object of the frame (strong reference).
* Does not raise an exception. */
PyAPI_FUNC(PyCodeObject *) PyUnstable_InterpreterFrame_GetCode(struct _PyInterpreterFrame *frame);
PyAPI_FUNC(PyObject *) PyUnstable_InterpreterFrame_GetCode(struct _PyInterpreterFrame *frame);
/* Returns a byte ofsset into the last executed instruction.
* Does not raise an exception. */