diff options
author | Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> | 2022-06-23 16:24:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-23 16:24:49 (GMT) |
commit | 852b4d4bcd12b0b6839a015a262ce976b134f6f3 (patch) | |
tree | c5dfb746d5f2c71e2989551a4bfebd129f036915 /Include | |
parent | 96a76141d52755ffda54fefc3c2c8da49e895e80 (diff) | |
download | cpython-852b4d4bcd12b0b6839a015a262ce976b134f6f3.zip cpython-852b4d4bcd12b0b6839a015a262ce976b134f6f3.tar.gz cpython-852b4d4bcd12b0b6839a015a262ce976b134f6f3.tar.bz2 |
[3.11] gh-93382: Cache result of `PyCode_GetCode` in codeobject (GH-93383) (#93493)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/code.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/cpython/code.h b/Include/cpython/code.h index d7c9aee..66cf4ec 100644 --- a/Include/cpython/code.h +++ b/Include/cpython/code.h @@ -89,6 +89,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 */ \ + PyObject *_co_code; /* cached co_code object/attribute */ \ char *_co_linearray; /* array of line offsets */ \ /* Scratch space for extra data relating to the code object. \ Type is a void* to keep the format private in codeobject.c to force \ |