diff options
author | Mark Shannon <mark@hotpy.org> | 2023-09-08 16:54:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 16:54:45 (GMT) |
commit | 501f2dc527010a4fe17026b3f352d72b01228b6f (patch) | |
tree | 7e2cf8307d4fdac6ac29a9326fa1a5d0f49932b4 | |
parent | ccd48623d4860e730a16f3f252d67bfea8c1e905 (diff) | |
download | cpython-501f2dc527010a4fe17026b3f352d72b01228b6f.zip cpython-501f2dc527010a4fe17026b3f352d72b01228b6f.tar.gz cpython-501f2dc527010a4fe17026b3f352d72b01228b6f.tar.bz2 |
GH-108614: Unbreak emscripten build (GH-109132)
-rw-r--r-- | Include/internal/pycore_emscripten_signal.h | 1 | ||||
-rw-r--r-- | Python/bytecodes.c | 4 | ||||
-rw-r--r-- | Python/emscripten_signal.c | 8 | ||||
-rw-r--r-- | Python/executor_cases.c.h | 4 | ||||
-rw-r--r-- | Python/generated_cases.c.h | 4 |
5 files changed, 11 insertions, 10 deletions
diff --git a/Include/internal/pycore_emscripten_signal.h b/Include/internal/pycore_emscripten_signal.h index d1bcb9a..754193e 100644 --- a/Include/internal/pycore_emscripten_signal.h +++ b/Include/internal/pycore_emscripten_signal.h @@ -18,6 +18,7 @@ _Py_CheckEmscriptenSignalsPeriodically(void); #define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() _Py_CheckEmscriptenSignalsPeriodically() extern int Py_EMSCRIPTEN_SIGNAL_HANDLING; +extern int _Py_emscripten_signal_clock; #else diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 8820b52..2106920 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -154,8 +154,8 @@ dummy_func( inst(RESUME_CHECK, (--)) { #if defined(__EMSCRIPTEN__) - DEOPT_IF(emscripten_signal_clock == 0, RESUME); - emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING; + DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME); + _Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING; #endif /* Possibly combine these two checks */ DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version diff --git a/Python/emscripten_signal.c b/Python/emscripten_signal.c index 1a19638..561b5b7 100644 --- a/Python/emscripten_signal.c +++ b/Python/emscripten_signal.c @@ -39,16 +39,16 @@ _Py_CheckEmscriptenSignals(void) } #define PY_EMSCRIPTEN_SIGNAL_INTERVAL 50 -static int emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL; +int _Py_emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL; void _Py_CheckEmscriptenSignalsPeriodically(void) { - if (emscripten_signal_clock == 0) { - emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL; + if (_Py_emscripten_signal_clock == 0) { + _Py_emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL; _Py_CheckEmscriptenSignals(); } else if (Py_EMSCRIPTEN_SIGNAL_HANDLING) { - emscripten_signal_clock--; + _Py_emscripten_signal_clock--; } } diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index f4c526a..fa7cb88 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -9,8 +9,8 @@ case RESUME_CHECK: { #if defined(__EMSCRIPTEN__) - DEOPT_IF(emscripten_signal_clock == 0, RESUME); - emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING; + DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME); + _Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING; #endif /* Possibly combine these two checks */ DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 84f83db..136b36c 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -28,8 +28,8 @@ TARGET(RESUME_CHECK) { #if defined(__EMSCRIPTEN__) - DEOPT_IF(emscripten_signal_clock == 0, RESUME); - emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING; + DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME); + _Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING; #endif /* Possibly combine these two checks */ DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version |