summaryrefslogtreecommitdiff
path: root/ext/nkf/nkf.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/nkf/nkf.c')
-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 cde0f7a9a6..b59688cb03 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;