diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-28 06:42:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-28 06:42:33 +0000 |
commit | 70a1eecdb95978a193c0dd6abd936e68fe1d84fd (patch) | |
tree | 5579b978cb50b78af633293e8e6ea50a7faa477e /ext/nkf | |
parent | 1b9d66dfebb17ae1e7c3dc7b4ce729e6e3e9b3cd (diff) | |
download | ruby-70a1eecdb95978a193c0dd6abd936e68fe1d84fd.tar.gz |
* ext/nkf/nkf-utf8/nkf.c (reinit): should initialize all static
variables. fixed: [ruby-list:40445]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/nkf')
-rw-r--r-- | ext/nkf/nkf-utf8/nkf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c index 5fa1956bf9..2db2500454 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 |