cpython: d731dcda2611 (original) (raw)
Mercurial > cpython
changeset 75599:d731dcda2611
Issue #3835: Refuse to use unthreaded Tcl in threaded Python. Patch by Guilherme Polo and Andrew Svetlov. [#3835]
Martin v. Löwis martin@v.loewis.de | |
---|---|
date | Tue, 13 Mar 2012 13:59:15 -0700 |
parents | 71041c0dedd5 |
children | 505c3b7dc539 b0d3b441f568 |
files | Misc/NEWS Modules/_tkinter.c |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-)[+] [-] Misc/NEWS 2 Modules/_tkinter.c 7 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -24,6 +24,8 @@ Core and Builtins 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
--- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -613,6 +613,13 @@ Tkapp_New(char *screenName, char *classN } #endif #ifdef WITH_THREAD
- if (!(v->threaded)) {
PyErr_SetString(PyExc_RuntimeError,[](#l2.8)
"Tcl/Tk was not compiled with --enable-threads but "[](#l2.9)
"Python has threads enabled");[](#l2.10)
Py_DECREF(v);[](#l2.11)
return 0;[](#l2.12)
- } if (v->threaded && tcl_lock) { /* If Tcl is threaded, we don't need the lock. */ PyThread_free_lock(tcl_lock);