comparison Python/pythonrun.c @ 33189:de804edf8bcd legacy-trunk

Patch #900727: Add Py_InitializeEx to allow embedding without signals.
author Martin v. Löwis <martin@v.loewis.de>
date Thu, 19 Aug 2004 11:31:58 +0000
parents caaef302f1e3
children 55fba88930bc
comparison
equal deleted inserted replaced
33188:0feccf19b16d 33189:de804edf8bcd
129 flag = 1; 129 flag = 1;
130 return flag; 130 return flag;
131 } 131 }
132 132
133 void 133 void
134 Py_Initialize(void) 134 Py_InitializeEx(int install_sigs)
135 { 135 {
136 PyInterpreterState *interp; 136 PyInterpreterState *interp;
137 PyThreadState *tstate; 137 PyThreadState *tstate;
138 PyObject *bimod, *sysmod; 138 PyObject *bimod, *sysmod;
139 char *p; 139 char *p;
206 /* phase 2 of builtins */ 206 /* phase 2 of builtins */
207 _PyImport_FixupExtension("__builtin__", "__builtin__"); 207 _PyImport_FixupExtension("__builtin__", "__builtin__");
208 208
209 _PyImportHooks_Init(); 209 _PyImportHooks_Init();
210 210
211 initsigs(); /* Signal handling stuff, including initintr() */ 211 if (install_sigs)
212 initsigs(); /* Signal handling stuff, including initintr() */
212 213
213 initmain(); /* Module __main__ */ 214 initmain(); /* Module __main__ */
214 if (!Py_NoSiteFlag) 215 if (!Py_NoSiteFlag)
215 initsite(); /* Module site */ 216 initsite(); /* Module site */
216 217
273 else 274 else
274 free(codeset); 275 free(codeset);
275 } 276 }
276 #endif 277 #endif
277 } 278 }
279
280 void
281 Py_Initialize(void)
282 {
283 Py_InitializeEx(1);
284 }
285
278 286
279 #ifdef COUNT_ALLOCS 287 #ifdef COUNT_ALLOCS
280 extern void dump_counts(void); 288 extern void dump_counts(void);
281 #endif 289 #endif
282 290