summaryrefslogtreecommitdiff
path: root/ext/tcltklib
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-09 05:03:21 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-09 05:03:21 +0000
commita4273db675d141176e92dfbd67d5eef1da7c38e9 (patch)
tree360c54ac5323cb713a04e76f1b5b19b09e47f7c4 /ext/tcltklib
parentec44b345a550eee408dd2a1df66307ce1feb3261 (diff)
* ext/tcltklib/tcltklib.c (ip_init): change flag value for setting 'argv' and 'argv0' variable
* ext/tk/lib/remote-tk.rb: follow changes of multi-tk.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tcltklib')
-rw-r--r--ext/tcltklib/tcltklib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c
index 657c5765b3..0a2fcbd349 100644
--- a/ext/tcltklib/tcltklib.c
+++ b/ext/tcltklib/tcltklib.c
@@ -2884,12 +2884,14 @@ ip_init(argc, argv, self)
/* without Tk */
with_tk = 0;
} else {
- Tcl_SetVar(ptr->ip, "argv", StringValuePtr(opts), 0);
+ /* Tcl_SetVar(ptr->ip, "argv", StringValuePtr(opts), 0); */
+ Tcl_SetVar(ptr->ip, "argv", StringValuePtr(opts), TCL_GLOBAL_ONLY);
}
case 1:
/* argv0 */
if (!NIL_P(argv0)) {
- Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), 0);
+ /* Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), 0); */
+ Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), TCL_GLOBAL_ONLY);
}
case 0:
/* no args */
@@ -2917,6 +2919,7 @@ ip_init(argc, argv, self)
/* get main window */
mainWin = Tk_MainWindow(ptr->ip);
+ Tk_Preserve((ClientData)mainWin);
/* add ruby command to the interpreter */
#if TCL_MAJOR_VERSION >= 8
@@ -3015,6 +3018,8 @@ ip_init(argc, argv, self)
(ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif
+ Tk_Release((ClientData)mainWin);
+
return self;
}