GH-90699: Move generated static initializer to pycore_runtime_generated.h (GH-94051)

This commit is contained in:
Kumar Aditya 2022-07-08 01:34:05 +05:30 committed by GitHub
parent afd6a37ad1
commit 71697664d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1170 additions and 1150 deletions

1
.gitattributes vendored
View File

@ -69,6 +69,7 @@ Doc/library/token-list.inc generated
Include/internal/pycore_ast.h generated
Include/internal/pycore_ast_state.h generated
Include/internal/pycore_opcode.h generated
Include/internal/pycore_runtime_init_generated.h generated
Include/opcode.h generated
Include/token.h generated
Lib/keyword.py generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1639,6 +1639,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_pystate.h \
$(srcdir)/Include/internal/pycore_range.h \
$(srcdir)/Include/internal/pycore_runtime.h \
$(srcdir)/Include/internal/pycore_runtime_init_generated.h \
$(srcdir)/Include/internal/pycore_runtime_init.h \
$(srcdir)/Include/internal/pycore_signal.h \
$(srcdir)/Include/internal/pycore_sliceobject.h \

View File

@ -241,6 +241,7 @@
<ClInclude Include="..\Include\internal\pycore_range.h" />
<ClInclude Include="..\Include\internal\pycore_runtime.h" />
<ClInclude Include="..\Include\internal\pycore_runtime_init.h" />
<ClInclude Include="..\Include\internal\pycore_runtime_init_generated.h" />
<ClInclude Include="..\Include\internal\pycore_signal.h" />
<ClInclude Include="..\Include\internal\pycore_sliceobject.h" />
<ClInclude Include="..\Include\internal\pycore_strhex.h" />

View File

@ -627,6 +627,9 @@
<ClInclude Include="..\Include\internal\pycore_runtime_init.h">
<Filter>Include\internal</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_runtime_init_generated.h">
<Filter>Include\internal</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_signal.h">
<Filter>Include\internal</Filter>
</ClInclude>

View File

@ -237,7 +237,7 @@ def generate_runtime_init(identifiers, strings):
assert nsmallposints and nsmallnegints
# Then target the runtime initializer.
filename = os.path.join(INTERNAL, 'pycore_runtime_init.h')
filename = os.path.join(INTERNAL, 'pycore_runtime_init_generated.h')
# Read the non-generated part of the file.
with open(filename) as infile: