mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
Patch #900727: Add Py_InitializeEx to allow embedding without signals.
This commit is contained in:
parent
4d4dfb7a2b
commit
336e85f56a
4 changed files with 20 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue