File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ char *Py_GetProgramName Py_PROTO((void));
4242
4343void Py_Initialize Py_PROTO ((void ));
4444void Py_Finalize Py_PROTO ((void ));
45+ int Py_IsInitialized Py_PROTO ((void ));
4546PyThreadState * Py_NewInterpreter Py_PROTO ((void ));
4647void Py_EndInterpreter Py_PROTO ((PyThreadState * ) );
4748
Original file line number Diff line number Diff line change @@ -220,6 +220,8 @@ EXPORTS
220220 Py_FatalError
221221 Py_Exit
222222 Py_Initialize
223+ Py_Finalize
224+ Py_IsInitialized
223225 PyErr_Print
224226 PyParser_SimpleParseFile
225227 PyParser_SimpleParseString
Original file line number Diff line number Diff line change @@ -78,6 +78,14 @@ int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
7878
7979static int initialized = 0 ;
8080
81+ /* API to access the initialized flag -- useful for eroteric use */
82+
83+ int
84+ Py_IsInitialized ()
85+ {
86+ return initialized ;
87+ }
88+
8189/* Global initializations. Can be undone by Py_Finalize(). Don't
8290 call this twice without an intervening Py_Finalize() call. When
8391 initializations fail, a fatal error is issued and the function does
You can’t perform that action at this time.
0 commit comments