summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-18 08:14:54 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-18 08:14:54 +0000
commit1d1ad956cb33755c80f3d112408044faef047d3e (patch)
tree1bf5ed35e2bfc50a53b90f3fd7d85d579803b0de
parent8d906bd08ece1ce1924e39d60c0b615c7be81c88 (diff)
* ext/tcltklib/stubs.c (ruby_tcltk_stubs): need to call
Tcl_FindExecutable() for Tcl/Tk 8.4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/tcltklib/stubs.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f3a6339b0d..cc55532ce26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 18 17:10:12 2004 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * ext/tcltklib/stubs.c (ruby_tcltk_stubs): need to call
+ Tcl_FindExecutable() for Tcl/Tk 8.4.
+
Wed Aug 18 12:52:55 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_obj_instance_eval): evaluates under special singleton
diff --git a/ext/tcltklib/stubs.c b/ext/tcltklib/stubs.c
index 56cc8ca921b..8faa4ca24ec 100644
--- a/ext/tcltklib/stubs.c
+++ b/ext/tcltklib/stubs.c
@@ -34,8 +34,9 @@ ruby_tcltk_stubs()
{
DL_HANDLE tcl_dll;
DL_HANDLE tk_dll;
+ void (*p_Tcl_FindExecutable)(const char *);
Tcl_Interp *(*p_Tcl_CreateInterp)();
- int (*p_Tk_Init) _((Tcl_Interp *));
+ int (*p_Tk_Init)(Tcl_Interp *);
Tcl_Interp *tcl_ip;
int n;
char *ruby_tcl_dll = 0;
@@ -72,6 +73,12 @@ ruby_tcltk_stubs()
if (!tcl_dll || !tk_dll)
return -1;
+ p_Tcl_FindExecutable = (void (*)(const char *))DL_SYM(tcl_dll, "Tcl_FindExecutable");
+ if (!p_Tcl_FindExecutable)
+ return -7;
+
+ p_Tcl_FindExecutable("ruby");
+
p_Tcl_CreateInterp = (Tcl_Interp *(*)())DL_SYM(tcl_dll, "Tcl_CreateInterp");
if (!p_Tcl_CreateInterp)
return -2;
@@ -80,7 +87,7 @@ ruby_tcltk_stubs()
if (!tcl_ip)
return -3;
- p_Tk_Init = (int (*) _((Tcl_Interp *)))DL_SYM(tk_dll, "Tk_Init");
+ p_Tk_Init = (int (*)(Tcl_Interp *))DL_SYM(tk_dll, "Tk_Init");
if (!p_Tk_Init)
return -4;
(*p_Tk_Init)(tcl_ip);