]> granicus.if.org Git - python/commitdiff
Neil discovered a bad DECREF on warnoptions, that caused repeated
authorGuido van Rossum <guido@python.org>
Sat, 13 Jan 2001 22:06:05 +0000 (22:06 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 13 Jan 2001 22:06:05 +0000 (22:06 +0000)
re-initializing Python (Py_Finalize() followed by Py_Initialize()) to
blow up quickly.  With the DECREF removed I can't get it to fail any
more.  (Except it still leaks, but that's probably a separate issue.)

Python/sysmodule.c

index 85fdc7e7f49c44b64a985d7718fb206f201d6f1c..3df85ff02289297233d53fb9d400c97f61639a53 100644 (file)
@@ -634,8 +634,7 @@ _PySys_Init(void)
                Py_INCREF(warnoptions);
        }
        if (warnoptions != NULL) {
-               PyDict_SetItemString(sysdict, "warnoptions", v = warnoptions);
-               Py_DECREF(v);
+               PyDict_SetItemString(sysdict, "warnoptions", warnoptions);
        }
        
        if (PyErr_Occurred())