Skip to content

Commit 1aeb2c5

Browse files
committed
Update emitmodule
1 parent 0bc3066 commit 1aeb2c5

3 files changed

Lines changed: 2 additions & 2 deletions

File tree

mypyc/codegen/emitmodule.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,7 @@ def emit_module_exec_func(
10871087
declaration = f"int CPyExec_{exported_name(module_name)}(PyObject *module)"
10881088
module_static = self.module_internal_static_name(module_name, emitter)
10891089
emitter.emit_lines(declaration, "{")
1090+
emitter.emit_line("intern_strings();")
10901091
if self.compiler_options.depends_on_librt_internal:
10911092
emitter.emit_line("if (import_librt_internal() < 0) {")
10921093
emitter.emit_line("return -1;")

mypyc/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
# Runtime C library files that are always included (some ops may bring
6969
# extra dependencies via mypyc.ir.SourceDep)
7070
RUNTIME_C_FILES: Final = [
71+
"static_data.c",
7172
"init.c",
7273
"getargs.c",
7374
"getargsfast.c",

mypyc/lib-rt/init.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include <Python.h>
22
#include "CPy.h"
3-
#include "static_data.c"
43

54
struct ExcDummyStruct _CPy_ExcDummyStruct = { PyObject_HEAD_INIT(NULL) };
65
PyObject *_CPy_ExcDummy = (PyObject *)&_CPy_ExcDummyStruct;
@@ -13,7 +12,6 @@ PyObject * __mypyc_empty_tuple__ = NULL;
1312
// other dynamic libraries. This means we need to initialize
1413
// things at load time.
1514
void CPy_Init(void) {
16-
intern_strings();
1715
_CPy_ExcDummyStruct.ob_base.ob_type = &PyBaseObject_Type;
1816

1917
// Initialize system-wide empty tuple constant

0 commit comments

Comments
 (0)