summaryrefslogtreecommitdiff
path: root/ext/nkf
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-20 07:10:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-20 07:10:23 +0000
commit58ac90ff773d7fc5107d7f2a886dd475053115f9 (patch)
tree25f6e2a15a8e14b12ac653ac365d2fe34be0abd4 /ext/nkf
parent125ca1a11a53810ac311012352f5b0773fc2bbde (diff)
marshal load GC protect
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/nkf')
-rw-r--r--ext/nkf/nkf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index cde0f7a..b59688c 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -49,6 +49,7 @@ rb_nkf_kconv(obj, opt, src)
{
int i;
char *opt_ptr, *opt_end;
+ volatile VALUE v;
reinit();
opt_ptr = str2cstr(opt, &i);
@@ -64,7 +65,8 @@ rb_nkf_kconv(obj, opt, src)
input_ctr = 0;
input = str2cstr(src, &i_len);
- dst = rb_str_new(0, i_len*3 + 10); /* large enough? */
+ dst = rb_str_new(0, i_len*3 + 10);
+ v = dst;
output_ctr = 0;
output = RSTRING(dst)->ptr;