From 03df3b3bc1073c43ae36777b8f5c3646b9cce61d Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 13 Jan 2001 22:06:05 +0000 Subject: [PATCH] Neil discovered a bad DECREF on warnoptions, that caused repeated 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 85fdc7e7f49..3df85ff0228 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -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())