diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2004-08-19 11:31:58 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2004-08-19 11:31:58 +0000 |
commit | c6d591ebbdcb54b06b069cf53b2392936ccb08cb (patch) | |
tree | f4a0e4fb0ce421f7ddc1821aff0bf4eb47a95a5d /Python/pythonrun.c | |
parent | 573155c7db94209ecaa132e59892df40f1e62c5a (diff) | |
download | cpython-c6d591ebbdcb54b06b069cf53b2392936ccb08cb.tar.gz |
Patch #900727: Add Py_InitializeEx to allow embedding without signals.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 4d03229f22..917f2be00b 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -131,7 +131,7 @@ add_flag(int flag, const char *envs) } void -Py_Initialize(void) +Py_InitializeEx(int install_sigs) { PyInterpreterState *interp; PyThreadState *tstate; @@ -208,7 +208,8 @@ Py_Initialize(void) _PyImportHooks_Init(); - initsigs(); /* Signal handling stuff, including initintr() */ + if (install_sigs) + initsigs(); /* Signal handling stuff, including initintr() */ initmain(); /* Module __main__ */ if (!Py_NoSiteFlag) @@ -276,6 +277,13 @@ Py_Initialize(void) #endif } +void +Py_Initialize(void) +{ + Py_InitializeEx(1); +} + + #ifdef COUNT_ALLOCS extern void dump_counts(void); #endif |