int _Py_UnhandledKeyboardInterrupt = 0;
_PyRuntimeState _PyRuntime = _PyRuntimeState_INIT;
+static int runtime_initialized = 0;
_PyInitError
_PyRuntime_Initialize(void)
every Py_Initialize() call, but doing so breaks the runtime.
This is because the runtime state is not properly finalized
currently. */
- static int initialized = 0;
- if (initialized) {
+ if (runtime_initialized) {
return _Py_INIT_OK();
}
- initialized = 1;
+ runtime_initialized = 1;
return _PyRuntimeState_Init(&_PyRuntime);
}
_PyRuntime_Finalize(void)
{
_PyRuntimeState_Fini(&_PyRuntime);
+ runtime_initialized = 0;
}
int