diff options
Diffstat (limited to 'ext/tk/stubs.c')
-rw-r--r-- | ext/tk/stubs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/tk/stubs.c b/ext/tk/stubs.c index 3fb3e5f2f3..cf362f4e12 100644 --- a/ext/tk/stubs.c +++ b/ext/tk/stubs.c @@ -34,7 +34,9 @@ _nativethread_consistency_check(ip) return; } - if (Tcl_Eval(ip, "set ::tcl_platform(threaded)") == TCL_OK) { + /* If the variable "tcl_platform(threaded)" exists, + then the Tcl interpreter was compiled with threads enabled. */ + if (Tcl_GetVar2(ip, "tcl_platform", "threaded", TCL_GLOBAL_ONLY) != (char*)NULL) { #ifdef HAVE_NATIVETHREAD /* consistent */ #else |