summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2004-08-19 11:31:58 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2004-08-19 11:31:58 (GMT)
commit336e85f56a87f2216855ca8a5771755f480ae7db (patch)
treeac9ca920703def475db825308caa688f3bd6b475 /Python
parent4d4dfb7a2b3bf4ed49a9f72ae8b802280b4e6154 (diff)
downloadcpython-336e85f56a87f2216855ca8a5771755f480ae7db.zip
cpython-336e85f56a87f2216855ca8a5771755f480ae7db.tar.gz
cpython-336e85f56a87f2216855ca8a5771755f480ae7db.tar.bz2
Patch #900727: Add Py_InitializeEx to allow embedding without signals.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 4d03229..917f2be 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