gh-124111: Fix TCL 9 thread detection (GH-128103)
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
Updated Tcl threading configuration in :mod:`_tkinter` to assume that
|
||||||
|
threads are always available in Tcl 9 and later.
|
||||||
@@ -575,8 +575,12 @@ Tkapp_New(const char *screenName, const char *className,
|
|||||||
|
|
||||||
v->interp = Tcl_CreateInterp();
|
v->interp = Tcl_CreateInterp();
|
||||||
v->wantobjects = wantobjects;
|
v->wantobjects = wantobjects;
|
||||||
|
#if TCL_MAJOR_VERSION >= 9
|
||||||
|
v->threaded = 1;
|
||||||
|
#else
|
||||||
v->threaded = Tcl_GetVar2Ex(v->interp, "tcl_platform", "threaded",
|
v->threaded = Tcl_GetVar2Ex(v->interp, "tcl_platform", "threaded",
|
||||||
TCL_GLOBAL_ONLY) != NULL;
|
TCL_GLOBAL_ONLY) != NULL;
|
||||||
|
#endif
|
||||||
v->thread_id = Tcl_GetCurrentThread();
|
v->thread_id = Tcl_GetCurrentThread();
|
||||||
v->dispatching = 0;
|
v->dispatching = 0;
|
||||||
v->trace = NULL;
|
v->trace = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user