diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-08 05:51:19 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-08 05:51:19 +0000 |
commit | a4804fbdf503a9c2b550b877120ca4029c65cdb3 (patch) | |
tree | 2a354e79dbe773294347b7123701720a9b1bbb60 /enc/unicode | |
parent | f8659dfd94d3f05f365996c68f2f1a78b1e7cbe3 (diff) |
support gperf 3.1
* tool/gperf.sed: extracted sed commands to a script. ANSI-C code
produced by gperf 3.1 declares length arguments as `size_t`. it
causes conflict with existing declarations, and needs casts for
a local variable and return statements.
[Feature #13883]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/unicode')
-rw-r--r-- | enc/unicode/10.0.0/name2ctype.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/enc/unicode/10.0.0/name2ctype.h b/enc/unicode/10.0.0/name2ctype.h index 6aab2cb3ae..4a1422d17a 100644 --- a/enc/unicode/10.0.0/name2ctype.h +++ b/enc/unicode/10.0.0/name2ctype.h @@ -34756,7 +34756,9 @@ struct uniname2ctype_struct { }; #define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str) +#if !1+0 static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned int); +#endif #ifndef USE_UNICODE_PROPERTIES #define TOTAL_KEYWORDS 15 @@ -34786,7 +34788,7 @@ inline #endif #endif static unsigned int -uniname2ctype_hash (register const char *str, register unsigned int len) +uniname2ctype_hash (register const char *str, register size_t len) { #ifndef USE_UNICODE_PROPERTIES static const unsigned char asso_values[] = @@ -34832,7 +34834,7 @@ uniname2ctype_hash (register const char *str, register unsigned int len) #ifndef USE_UNICODE_PROPERTIES return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; #else /* USE_UNICODE_PROPERTIES */ - register unsigned int hval = len; + register unsigned int hval = (unsigned int)len; switch (hval) { @@ -36535,7 +36537,7 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = }; #define uniname2ctype_pool ((const char *) &uniname2ctype_pool_contents) const struct uniname2ctype_struct * -uniname2ctype_p (register const char *str, register unsigned int len) +uniname2ctype_p (register const char *str, register size_t len) { static const struct uniname2ctype_struct wordlist[] = { |