Skip to content

Commit d9eb7a9

Browse files
Fix externs
Co-Authored-By: Chris Eibl <[email protected]>
1 parent 008979a commit d9eb7a9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Include/internal/pycore_opcode_metadata.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/cases_generator/opcode_metadata_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def generate_instruction_formats(analysis: Analysis, out: CWriter) -> None:
147147

148148

149149
def generate_deopt_table(analysis: Analysis, out: CWriter) -> None:
150-
out.emit("extern const uint8_t _PyOpcode_Deopt[256];\n")
150+
out.emit("PyAPI_DATA(const uint8_t) _PyOpcode_Deopt[256];\n")
151151
out.emit("#ifdef NEED_OPCODE_METADATA\n")
152152
out.emit("const uint8_t _PyOpcode_Deopt[256] = {\n")
153153
deopts: list[tuple[str, str]] = []
@@ -170,7 +170,7 @@ def generate_deopt_table(analysis: Analysis, out: CWriter) -> None:
170170

171171

172172
def generate_cache_table(analysis: Analysis, out: CWriter) -> None:
173-
out.emit("extern const uint8_t _PyOpcode_Caches[256];\n")
173+
out.emit("PyAPI_DATA(const uint8_t) _PyOpcode_Caches[256];\n")
174174
out.emit("#ifdef NEED_OPCODE_METADATA\n")
175175
out.emit("const uint8_t _PyOpcode_Caches[256] = {\n")
176176
for inst in analysis.instructions.values():

0 commit comments

Comments
 (0)