diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-05 20:16:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-05 20:16:32 +0000 |
commit | 5528903d01816a99313404672f96229798663a10 (patch) | |
tree | c5c3e4af3fb8f9680ca33674de0da03569eaa02f /enc/iso_8859_1.c | |
parent | d8d9bac5c8b071135e50ad3f21c8a9b6a9c06e54 (diff) |
* enc/{emacs_mule,euc_jp}.c (code_to_mbc): suppress warnings.
* enc/iso_8859_{1,2}.c (apply_all_case_fold): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/iso_8859_1.c')
-rw-r--r-- | enc/iso_8859_1.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/enc/iso_8859_1.c b/enc/iso_8859_1.c index b73f8ca379..a10a7679b8 100644 --- a/enc/iso_8859_1.c +++ b/enc/iso_8859_1.c @@ -29,6 +29,8 @@ #include "regenc.h" +#define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) + #define ENC_IS_ISO_8859_1_CTYPE(code,ctype) \ ((EncISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) @@ -107,7 +109,7 @@ apply_all_case_fold(OnigCaseFoldType flag, OnigEncoding enc ARG_UNUSED) { return onigenc_apply_all_case_fold_with_map( - sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + numberof(CaseFoldMap), CaseFoldMap, 1, flag, f, arg); } |