]> granicus.if.org Git - python/commitdiff
Fix the evil booboos. ;( Causes discussed with Jeremy offline.
authorFred Drake <fdrake@acm.org>
Thu, 24 Aug 2000 22:27:02 +0000 (22:27 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 24 Aug 2000 22:27:02 +0000 (22:27 +0000)
Modules/pyexpat.c

index 657203736956de5a76899e5c93731f6f20c74155..2b8d03e4b900d319f8162bb867284be92cc3b05a 100644 (file)
@@ -883,7 +883,7 @@ initpyexpat(void)
         PyObject *errmod_name = PyString_FromString("pyexpat.errors");
 
         if (errmod_name != NULL) {
-            errors_module = PyDict_GetItem(errmod_name);
+            errors_module = PyDict_GetItem(d, errmod_name);
             if (errors_module == NULL) {
                 errors_module = PyModule_New("pyexpat.errors");
                 if (errors_module != NULL) {
@@ -891,7 +891,7 @@ initpyexpat(void)
                     PyDict_SetItem(sys_modules, errmod_name, errors_module);
                 }
             }
-            PyDECREF(errmod_name);
+            Py_DECREF(errmod_name);
             if (errors_module == NULL)
                 /* Don't code dump later! */
                 return;