mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-93382: Cache result of PyCode_GetCode
in codeobject (GH-93383)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
This commit is contained in:
parent
d8f40ead92
commit
d52ffc1d1f
5 changed files with 21 additions and 4 deletions
|
@ -88,6 +88,7 @@ typedef uint16_t _Py_CODEUNIT;
|
|||
PyObject *co_qualname; /* unicode (qualname, for reference) */ \
|
||||
PyObject *co_linetable; /* bytes object that holds location info */ \
|
||||
PyObject *co_weakreflist; /* to support weakrefs to code objects */ \
|
||||
void *_co_code; /* cached co_code object/attribute */ \
|
||||
/* Scratch space for extra data relating to the code object. \
|
||||
Type is a void* to keep the format private in codeobject.c to force \
|
||||
people to go through the proper APIs. */ \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue