#17115: I hate you MS for not supporting C99.

This commit is contained in:
Brett Cannon 2013-05-04 17:37:09 -04:00
parent 4f9b4343ed
commit 13853a67cf
1 changed files with 2 additions and 2 deletions

View File

@ -843,7 +843,7 @@ Py_GetPythonHome(void)
static void static void
initmain(PyInterpreterState *interp) initmain(PyInterpreterState *interp)
{ {
PyObject *m, *d; PyObject *m, *d, *loader;
m = PyImport_AddModule("__main__"); m = PyImport_AddModule("__main__");
if (m == NULL) if (m == NULL)
Py_FatalError("can't create __main__ module"); Py_FatalError("can't create __main__ module");
@ -864,7 +864,7 @@ initmain(PyInterpreterState *interp)
* be set if __main__ gets further initialized later in the startup * be set if __main__ gets further initialized later in the startup
* process. * process.
*/ */
PyObject *loader = PyDict_GetItemString(d, "__loader__"); loader = PyDict_GetItemString(d, "__loader__");
if (loader == NULL || loader == Py_None) { if (loader == NULL || loader == Py_None) {
PyObject *loader = PyObject_GetAttrString(interp->importlib, PyObject *loader = PyObject_GetAttrString(interp->importlib,
"BuiltinImporter"); "BuiltinImporter");