mirror of
https://github.com/python/cpython.git
synced 2025-09-11 11:17:16 +00:00
[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>
This commit is contained in:
parent
96a76141d5
commit
852b4d4bcd
6 changed files with 543 additions and 528 deletions
|
|
@ -279,6 +279,7 @@ class Printer:
|
|||
self.write(f".co_name = {co_name},")
|
||||
self.write(f".co_qualname = {co_qualname},")
|
||||
self.write(f".co_linetable = {co_linetable},")
|
||||
self.write(f"._co_code = NULL,")
|
||||
self.write("._co_linearray = NULL,")
|
||||
self.write(f".co_code_adaptive = {co_code_adaptive},")
|
||||
name_as_code = f"(PyCodeObject *)&{name}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue