mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
bpo-46753: Add the empty tuple to the _PyRuntimeState.global_objects. (gh-31345)
https://bugs.python.org/issue46753
This commit is contained in:
parent
d5b7bba43b
commit
08deed1af5
8 changed files with 218 additions and 204 deletions
|
@ -252,6 +252,9 @@ def generate_runtime_init(identifiers, strings):
|
|||
for name in sorted(identifiers):
|
||||
assert name.isidentifier(), name
|
||||
printer.write(f'INIT_ID({name}),')
|
||||
printer.write('')
|
||||
with printer.block('.tuple_empty =', ','):
|
||||
printer.write('.ob_base = _PyVarObject_IMMORTAL_INIT(&PyTuple_Type, 0)')
|
||||
printer.write(END)
|
||||
printer.write(after)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue