diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-18 15:02:36 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-18 15:02:36 +0000 |
commit | 8480bcc8d5c72b61055cfa98e80f37fd62ae7ad4 (patch) | |
tree | f404254dbcee2a59866dbb3f7baab4df8e4b23ce /ext/tk/tcltklib.c | |
parent | 32378c5abea38a8278dae28eae9abcd547ac8a95 (diff) |
Merge -r16241:16456 from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/tcltklib.c')
-rw-r--r-- | ext/tk/tcltklib.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index e9aeb7d2fc..680b8da984 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -4,7 +4,7 @@ * Oct. 24, 1997 Y. Matsumoto */ -#define TCLTKLIB_RELEASE_DATE "2008-04-02" +#define TCLTKLIB_RELEASE_DATE "2008-05-16" #include "ruby.h" @@ -3153,6 +3153,7 @@ ip_ruby_cmd(clientData, interp, argc, argv) str, "'", (char *)NULL); rbtk_pending_exception = rb_exc_new2(rb_eArgError, Tcl_GetStringResult(interp)); + if (old_gc == Qfalse) rb_gc_enable(); return TCL_ERROR; #endif } @@ -5155,6 +5156,8 @@ ip_finalize(ip) Tcl_CreateCommand(ip, "ruby_cmd", ip_null_proc, (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); #endif + rb_thread_critical = thr_crit_bup; + return; } /* delete root widget */ @@ -5162,7 +5165,7 @@ ip_finalize(ip) DUMP1("check `destroy'"); if (Tcl_GetCommandInfo(ip, "destroy", &info)) { DUMP1("call `destroy'"); - Tcl_GlobalEval(ip, "destroy ."); + Tcl_GlobalEval(ip, "catch {destroy .}"); } #endif #if 1 @@ -7106,7 +7109,8 @@ lib_toUTF8_core(ip_obj, src, encodename) if (NIL_P(enc)) { encoding = (Tcl_Encoding)NULL; } else { - StringValue(enc); + /* StringValue(enc); */ + enc = rb_funcall(enc, ID_to_s, 0, 0); /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */ encoding = Tcl_GetEncoding((Tcl_Interp*)NULL, RSTRING_PTR(enc)); @@ -7292,7 +7296,8 @@ lib_fromUTF8_core(ip_obj, src, encodename) if (NIL_P(enc)) { encoding = (Tcl_Encoding)NULL; } else { - StringValue(enc); + /* StringValue(enc); */ + enc = rb_funcall(enc, ID_to_s, 0, 0); /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */ encoding = Tcl_GetEncoding((Tcl_Interp*)NULL, RSTRING_PTR(enc)); |