comparison Python/pythonrun.c @ 47887:6f132a26b22f legacy-trunk

Fix tabs.
author Georg Brandl <georg@python.org>
date Sat, 05 Jul 2008 10:07:18 +0000
parents 52294af4b663
children 7ad6e4cd7713
comparison
equal deleted inserted replaced
47886:c93596ec1d3d 47887:6f132a26b22f
227 _PyImportHooks_Init(); 227 _PyImportHooks_Init();
228 228
229 if (install_sigs) 229 if (install_sigs)
230 initsigs(); /* Signal handling stuff, including initintr() */ 230 initsigs(); /* Signal handling stuff, including initintr() */
231 231
232 /* Initialize warnings. */ 232 /* Initialize warnings. */
233 _PyWarnings_Init(); 233 _PyWarnings_Init();
234 if (PySys_HasWarnOptions()) { 234 if (PySys_HasWarnOptions()) {
235 PyObject *warnings_module = PyImport_ImportModule("warnings"); 235 PyObject *warnings_module = PyImport_ImportModule("warnings");
236 if (!warnings_module) 236 if (!warnings_module)
237 PyErr_Clear(); 237 PyErr_Clear();
238 Py_XDECREF(warnings_module); 238 Py_XDECREF(warnings_module);
239 } 239 }
240 240
241 initmain(); /* Module __main__ */ 241 initmain(); /* Module __main__ */
242 if (!Py_NoSiteFlag) 242 if (!Py_NoSiteFlag)
243 initsite(); /* Module site */ 243 initsite(); /* Module site */
244 244
1124 if (exception == NULL) 1124 if (exception == NULL)
1125 return; 1125 return;
1126 PyErr_NormalizeException(&exception, &v, &tb); 1126 PyErr_NormalizeException(&exception, &v, &tb);
1127 if (exception == NULL) 1127 if (exception == NULL)
1128 return; 1128 return;
1129 /* Now we know v != NULL too */ 1129 /* Now we know v != NULL too */
1130 if (set_sys_last_vars) { 1130 if (set_sys_last_vars) {
1131 PySys_SetObject("last_type", exception); 1131 PySys_SetObject("last_type", exception);
1132 PySys_SetObject("last_value", v); 1132 PySys_SetObject("last_value", v);
1133 PySys_SetObject("last_traceback", tb); 1133 PySys_SetObject("last_traceback", tb);
1134 } 1134 }
1859 1859
1860 #undef PyRun_File 1860 #undef PyRun_File
1861 PyAPI_FUNC(PyObject *) 1861 PyAPI_FUNC(PyObject *)
1862 PyRun_File(FILE *fp, const char *p, int s, PyObject *g, PyObject *l) 1862 PyRun_File(FILE *fp, const char *p, int s, PyObject *g, PyObject *l)
1863 { 1863 {
1864 return PyRun_FileExFlags(fp, p, s, g, l, 0, NULL); 1864 return PyRun_FileExFlags(fp, p, s, g, l, 0, NULL);
1865 } 1865 }
1866 1866
1867 #undef PyRun_FileEx 1867 #undef PyRun_FileEx
1868 PyAPI_FUNC(PyObject *) 1868 PyAPI_FUNC(PyObject *)
1869 PyRun_FileEx(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, int c) 1869 PyRun_FileEx(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, int c)
1870 { 1870 {
1871 return PyRun_FileExFlags(fp, p, s, g, l, c, NULL); 1871 return PyRun_FileExFlags(fp, p, s, g, l, c, NULL);
1872 } 1872 }
1873 1873
1874 #undef PyRun_FileFlags 1874 #undef PyRun_FileFlags
1875 PyAPI_FUNC(PyObject *) 1875 PyAPI_FUNC(PyObject *)
1876 PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, 1876 PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l,
1877 PyCompilerFlags *flags) 1877 PyCompilerFlags *flags)
1878 { 1878 {
1879 return PyRun_FileExFlags(fp, p, s, g, l, 0, flags); 1879 return PyRun_FileExFlags(fp, p, s, g, l, 0, flags);
1880 } 1880 }
1881 1881
1882 #undef PyRun_SimpleFile 1882 #undef PyRun_SimpleFile
1883 PyAPI_FUNC(int) 1883 PyAPI_FUNC(int)
1884 PyRun_SimpleFile(FILE *f, const char *p) 1884 PyRun_SimpleFile(FILE *f, const char *p)