mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tcltklib/stubs.c (ruby_tcltk_stubs): win32_getenv returns
the same address always, so allocate string by ruby_strdup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d0c513da9d
commit
1f41dff075
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Jul 30 15:24:07 2002 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* ext/tcltklib/stubs.c (ruby_tcltk_stubs): win32_getenv returns
|
||||
the same address always, so allocate string by ruby_strdup.
|
||||
|
||||
Fri Jul 12 00:51:09 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* eval.c (rb_eval): fixed line number in string interpolation.
|
||||
|
|
|
@ -40,10 +40,16 @@ ruby_tcltk_stubs()
|
|||
char tk_name[20];
|
||||
|
||||
ruby_tcl_dll = getenv("RUBY_TCL_DLL");
|
||||
#if defined NT
|
||||
if (ruby_tcl_dll) ruby_tcl_dll = ruby_strdup(ruby_tcl_dll);
|
||||
#endif
|
||||
ruby_tk_dll = getenv("RUBY_TK_DLL");
|
||||
if (ruby_tcl_dll && ruby_tk_dll) {
|
||||
tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll);
|
||||
tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll);
|
||||
#if defined NT
|
||||
ruby_xfree(ruby_tcl_dll);
|
||||
#endif
|
||||
} else {
|
||||
snprintf(tcl_name, sizeof tcl_name, TCL_NAME, DLEXT);
|
||||
snprintf(tk_name, sizeof tk_name, TK_NAME, DLEXT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue