diff options
author | Guido van Rossum <guido@python.org> | 1997-08-22 04:20:13 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-08-22 04:20:13 +0000 |
commit | 6464383d4701d236887cfaa7beab8086a0591f74 (patch) | |
tree | 463b26a29b0bb8e51ccc0aa88dbbdc308de3365f /Python/pythonrun.c | |
parent | 88604fa97fedd53b074351ad8b5e23f3dfb08fa0 (diff) | |
download | cpython-6464383d4701d236887cfaa7beab8086a0591f74.tar.gz |
Added new Py_IsInitalized() API function to test the 'initialized' flag.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 9f977f05b4..22cb86bdca 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 |