Skip to content

Commit 00c9eb3

Browse files
committed
gh-144712: Export _Py_jit_entry symbol via PyAPI_DATA
1 parent ba0aca3 commit 00c9eb3

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

Include/internal/pycore_ceval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ _Py_CODEUNIT *_PyTier2Interpreter(
131131
);
132132
#endif
133133

134-
extern _PyJitEntryFuncPtr _Py_jit_entry;
134+
PyAPI_DATA(_PyJitEntryFuncPtr) _Py_jit_entry;
135135

136136
extern PyObject*
137137
_PyEval_Vector(PyThreadState *tstate,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ``_testinternalcapi`` import failure due to missing ``_Py_jit_entry`` symbol when built with :option:`--enable-experimental-jit`. Patch by Shamil Abdulaev.

Modules/_testinternalcapi/interpreter.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ stop_tracing_and_jit(PyThreadState *tstate, _PyInterpreterFrame *frame)
2424
}
2525
#endif
2626

27-
_PyJitEntryFuncPtr _Py_jit_entry;
28-
2927
#if _Py_TAIL_CALL_INTERP
3028
#include "test_targets.h"
3129
#include "test_cases.c.h"

Python/ceval.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,9 +1337,9 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
13371337
}
13381338
#ifdef _Py_TIER2
13391339
#ifdef _Py_JIT
1340-
_PyJitEntryFuncPtr _Py_jit_entry = _PyJIT_Entry;
1340+
PyAPI_DATA(_PyJitEntryFuncPtr) _Py_jit_entry = _PyJIT_Entry;
13411341
#else
1342-
_PyJitEntryFuncPtr _Py_jit_entry = _PyTier2Interpreter;
1342+
PyAPI_DATA(_PyJitEntryFuncPtr) _Py_jit_entry = _PyTier2Interpreter;
13431343
#endif
13441344
#endif
13451345

0 commit comments

Comments
 (0)