diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-07 04:47:08 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-07 04:47:08 +0000 |
commit | f1d4dfca2b64a115fd4b8f4c9300113ec957d269 (patch) | |
tree | eb5fa22b493a34469100e90b9120e4b1c2ef6c1f /ext/tk/stubs.c | |
parent | f38216d43bf8a51ceaa426a74813c5fbe6ff954e (diff) | |
download | ruby-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.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 |