summaryrefslogtreecommitdiff
path: root/ext/tk/stubs.c
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-07 04:47:08 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-07 04:47:08 +0000
commitf1d4dfca2b64a115fd4b8f4c9300113ec957d269 (patch)
treeeb5fa22b493a34469100e90b9120e4b1c2ef6c1f /ext/tk/stubs.c
parentf38216d43bf8a51ceaa426a74813c5fbe6ff954e (diff)
downloadruby-f1d4dfca2b64a115fd4b8f4c9300113ec957d269.tar.gz
* ext/tk/stubs.c (_nativethread_consistency_check): use simpler
(low cost) way to check whether the Tcl interpreter was compiled with threads enabled of not. * ext/tk/tcltklib.c: reduce warnings. * ext/tk/tkutil/tkutil.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/stubs.c')
-rw-r--r--ext/tk/stubs.c4
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