[Python-checkins] cpython: Issue #15926: Fix crash after multiple reinitializations of the interpreter.

antoine.pitrou python-checkins at python.org
Wed Sep 12 18:02:46 CEST 2012


http://hg.python.org/cpython/rev/8d22d9528164
changeset: 79012:8d22d9528164
parent: 79005:2fa7c104f909
user: Antoine Pitrou <solipsis at pitrou.net>
date: Wed Sep 12 18:01:36 2012 +0200
summary:
 Issue #15926: Fix crash after multiple reinitializations of the interpreter.
files:
 Misc/NEWS | 2 ++
 Modules/posixmodule.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@
 Core and Builtins
 -----------------
 
+- Issue #15926: Fix crash after multiple reinitializations of the interpreter.
+
 - Issue #15895: Fix FILE pointer leak in one error branch of
 PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file, closeit
 is false an and set_main_loader() fails.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -11852,7 +11852,6 @@
 
 /* initialize TerminalSize_info */
 PyStructSequence_InitType(&TerminalSizeType, &TerminalSize_desc);
- Py_INCREF(&TerminalSizeType);
 }
 #if defined(HAVE_WAITID) && !defined(__APPLE__)
 Py_INCREF((PyObject*) &WaitidResultType);
@@ -11915,6 +11914,7 @@
 
 #endif /* __APPLE__ */
 
+ Py_INCREF(&TerminalSizeType);
 PyModule_AddObject(m, "terminal_size", (PyObject*) &TerminalSizeType);
 
 billion = PyLong_FromLong(1000000000);
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /