summaryrefslogtreecommitdiff
path: root/ext/tk/tkutil.c
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-12 16:05:59 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-12 16:05:59 +0000
commit5bea219a9d95e58a1b2ad77637776a8e0cade1bf (patch)
tree1033000ed7c15e82106f375c3031ffaffa5ed3d8 /ext/tk/tkutil.c
parenta472f971f0e39f16949975b09ca6c7346de3f99b (diff)
* ext/tcltklib/tcltklib.c: improve control of preserv/release tcltkip
* ext/tcltklib/tcltklib.c: store original 'exit' command * ext/tk/tkutil.c: fix(?) SEGV git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/tkutil.c')
-rw-r--r--ext/tk/tkutil.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/tk/tkutil.c b/ext/tk/tkutil.c
index aaa77b1aa8..0595207fe3 100644
--- a/ext/tk/tkutil.c
+++ b/ext/tk/tkutil.c
@@ -737,6 +737,13 @@ tk_conv_args(argc, argv, self)
{
int idx, size;
volatile VALUE dst;
+ int thr_crit_bup;
+ VALUE old_gc;
+
+ thr_crit_bup = rb_thread_critical;
+ rb_thread_critical = Qtrue;
+
+ old_gc = rb_gc_disable();
if (argc < 2) {
rb_raise(rb_eArgError, "too few arguments");
@@ -764,6 +771,9 @@ tk_conv_args(argc, argv, self)
}
}
+ if (old_gc == Qfalse) rb_gc_enable();
+ rb_thread_critical = thr_crit_bup;
+
return rb_ary_plus(argv[0], dst);
}