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
commitb02a1abd2bf8e6a1df971690331b04cb9c092a40 (patch)
treedc68b598644b8897320ca35873a7937ed9b866cc /ext/tk/stubs.c
parente0d202cb9b366c0f0187d518dc53092375e2a055 (diff)
* 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/branches/ruby_1_8@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