summaryrefslogtreecommitdiffstats
path: root/Include/internal/pystate.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pystate.h')
-rw-r--r--Include/internal/pystate.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Include/internal/pystate.h b/Include/internal/pystate.h
index 210917b..516f829 100644
--- a/Include/internal/pystate.h
+++ b/Include/internal/pystate.h
@@ -74,10 +74,16 @@ typedef struct pyruntimestate {
// XXX Consolidate globals found via the check-c-globals script.
} _PyRuntimeState;
+#define _PyRuntimeState_INIT {.initialized = 0, .core_initialized = 0}
+
PyAPI_DATA(_PyRuntimeState) _PyRuntime;
-PyAPI_FUNC(void) _PyRuntimeState_Init(_PyRuntimeState *);
+PyAPI_FUNC(_PyInitError) _PyRuntimeState_Init(_PyRuntimeState *);
PyAPI_FUNC(void) _PyRuntimeState_Fini(_PyRuntimeState *);
+/* Initialize _PyRuntimeState.
+ Return NULL on success, or return an error message on failure. */
+PyAPI_FUNC(_PyInitError) _PyRuntime_Initialize(void);
+
#define _Py_CURRENTLY_FINALIZING(tstate) \
(_PyRuntime.finalizing == tstate)