Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Checkins

cpython: Issue #3835: Refuse to use unthreaded Tcl in threaded Python.

 

 

Python checkins RSS feed   Index | Next | Previous | View Threaded


python-checkins at python

Mar 13, 2012, 1:59 PM

Post #1 of 1 (65 views)
Permalink
cpython: Issue #3835: Refuse to use unthreaded Tcl in threaded Python.

http://hg.python.org/cpython/rev/d731dcda2611
changeset: 75599:d731dcda2611
user: Martin v. Löwis <martin [at] v>
date: Tue Mar 13 13:59:15 2012 -0700
summary:
Issue #3835: Refuse to use unthreaded Tcl in threaded Python.
Patch by Guilherme Polo and Andrew Svetlov.

files:
Misc/NEWS | 2 ++
Modules/_tkinter.c | 7 +++++++
2 files changed, 9 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,8 @@
Library
-------

+- Issue #3835: Refuse to use unthreaded Tcl in threaded Python.
+
- Issue #2843: Add new Tk API to Tkinter.

- Issue #14184: Increase the default stack size for secondary threads on
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -613,6 +613,13 @@
}
#endif
#ifdef WITH_THREAD
+ if (!(v->threaded)) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "Tcl/Tk was not compiled with --enable-threads but "
+ "Python has threads enabled");
+ Py_DECREF(v);
+ return 0;
+ }
if (v->threaded && tcl_lock) {
/* If Tcl is threaded, we don't need the lock. */
PyThread_free_lock(tcl_lock);

--
Repository URL: http://hg.python.org/cpython

Python checkins RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.