summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-22 04:20:13 (GMT)
committerGuido van Rossum <guido@python.org>1997-08-22 04:20:13 (GMT)
commite3c0d5eb3452f8bfcc15bf1e2985dcc83fa01901 (patch)
treeceeb0dfad333ecff0d9289e4fb9cc7f0b879505c /Python
parent779133c70791aa46f98e22854dcbdd2b47d3a60c (diff)
downloadcpython-e3c0d5eb3452f8bfcc15bf1e2985dcc83fa01901.zip
cpython-e3c0d5eb3452f8bfcc15bf1e2985dcc83fa01901.tar.gz
cpython-e3c0d5eb3452f8bfcc15bf1e2985dcc83fa01901.tar.bz2
Added new Py_IsInitalized() API function to test the 'initialized' flag.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 9f977f0..22cb86b 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -78,6 +78,14 @@ int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
static int initialized = 0;
+/* API to access the initialized flag -- useful for eroteric use */
+
+int
+Py_IsInitialized()
+{
+ return initialized;
+}
+
/* Global initializations. Can be undone by Py_Finalize(). Don't
call this twice without an intervening Py_Finalize() call. When
initializations fail, a fatal error is issued and the function does