comparison Python/pythonrun.c @ 6136:57045f51dd12 legacy-trunk

Added new Py_IsInitalized() API function to test the 'initialized' flag.
author Guido van Rossum <guido@python.org>
date Fri, 22 Aug 1997 04:20:13 +0000
parents 98a282cfb013
children 29ddf1049842
comparison
equal deleted inserted replaced
6135:32f65741743b 6136:57045f51dd12
75 int Py_DebugFlag; /* Needed by parser.c */ 75 int Py_DebugFlag; /* Needed by parser.c */
76 int Py_VerboseFlag; /* Needed by import.c */ 76 int Py_VerboseFlag; /* Needed by import.c */
77 int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */ 77 int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
78 78
79 static int initialized = 0; 79 static int initialized = 0;
80
81 /* API to access the initialized flag -- useful for eroteric use */
82
83 int
84 Py_IsInitialized()
85 {
86 return initialized;
87 }
80 88
81 /* Global initializations. Can be undone by Py_Finalize(). Don't 89 /* Global initializations. Can be undone by Py_Finalize(). Don't
82 call this twice without an intervening Py_Finalize() call. When 90 call this twice without an intervening Py_Finalize() call. When
83 initializations fail, a fatal error is issued and the function does 91 initializations fail, a fatal error is issued and the function does
84 not return. On return, the first thread and interpreter state have 92 not return. On return, the first thread and interpreter state have