summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-28 06:42:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-28 06:42:33 +0000
commit7fac9ffae3a631cbe8e8fc8bc4a68cfc58e84439 (patch)
tree029a3119475679a7a429fe4fddd73c2a76730520 /ext
parent42c99028bf1ed3e7adffd4d643362d5e75a5a7af (diff)
downloadruby-7fac9ffae3a631cbe8e8fc8bc4a68cfc58e84439.tar.gz
ruby-7fac9ffae3a631cbe8e8fc8bc4a68cfc58e84439.tar.xz
ruby-7fac9ffae3a631cbe8e8fc8bc4a68cfc58e84439.zip
* ext/nkf/nkf-utf8/nkf.c (reinit): should initialize all static
variables. fixed: [ruby-list:40445] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/nkf/nkf-utf8/nkf.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c
index 5fa1956bf..2db250045 100644
--- a/ext/nkf/nkf-utf8/nkf.c
+++ b/ext/nkf/nkf-utf8/nkf.c
@@ -1303,6 +1303,10 @@ struct input_code * find_inputcode_byfunc(iconv_func)
return 0;
}
+#ifdef CHECK_OPTION
+static int (*iconv_for_check)() = 0;
+#endif
+
#ifdef ANSI_C_PROTOTYPE
void set_iconv(int f, int (*iconv_func)(int c2,int c1,int c0))
#else
@@ -1311,9 +1315,6 @@ void set_iconv(f, iconv_func)
int (*iconv_func)();
#endif
{
-#ifdef CHECK_OPTION
- static int (*iconv_for_check)() = 0;
-#endif
#ifdef INPUT_CODE_FIX
if (f || !input_f)
#endif
@@ -4292,6 +4293,9 @@ reinit()
broken_counter = 0;
broken_last = 0;
z_prev2=0,z_prev1=0;
+#ifdef CHECK_OPTION
+ iconv_for_check = 0;
+#endif
}
#endif