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 | 4d1d308df21c74c0423ceec99ca98495ce1cbab4 (patch) | |
| tree | dc68b598644b8897320ca35873a7937ed9b866cc /ext/tk/stubs.c | |
| parent | e764dd2ee0597d218c02650cf11bdbcc5329c262 (diff) | |
| download | ruby-4d1d308df21c74c0423ceec99ca98495ce1cbab4.tar.gz ruby-4d1d308df21c74c0423ceec99ca98495ce1cbab4.tar.xz ruby-4d1d308df21c74c0423ceec99ca98495ce1cbab4.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@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 3fb3e5f2f..cf362f4e1 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 |
