Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 15846:d41f9b0a40ca legacy-trunk
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.)
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Sat, 13 Jan 2001 22:06:05 +0000 |
| parents | a563eec46c1a |
| children | b44e77a12978 |
line wrap: on
line diff
--- a/Python/sysmodule.c Sat Jan 13 19:16:21 2001 +0000 +++ b/Python/sysmodule.c Sat Jan 13 22:06:05 2001 +0000 @@ -634,8 +634,7 @@ Py_INCREF(warnoptions); } if (warnoptions != NULL) { - PyDict_SetItemString(sysdict, "warnoptions", v = warnoptions); - Py_DECREF(v); + PyDict_SetItemString(sysdict, "warnoptions", warnoptions); } if (PyErr_Occurred())
