Skip to content

Commit dc09870

Browse files
authored
pythongh-124111: Fix TCL 9 thread detection (pythonGH-128103)
1 parent 558936b commit dc09870

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Updated Tcl threading configuration in :mod:`_tkinter` to assume that
2+
threads are always available in Tcl 9 and later.

Modules/_tkinter.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,12 @@ Tkapp_New(const char *screenName, const char *className,
575575

576576
v->interp = Tcl_CreateInterp();
577577
v->wantobjects = wantobjects;
578+
#if TCL_MAJOR_VERSION >= 9
579+
v->threaded = 1;
580+
#else
578581
v->threaded = Tcl_GetVar2Ex(v->interp, "tcl_platform", "threaded",
579582
TCL_GLOBAL_ONLY) != NULL;
583+
#endif
580584
v->thread_id = Tcl_GetCurrentThread();
581585
v->dispatching = 0;
582586
v->trace = NULL;

0 commit comments

Comments
 (0)