diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-14 09:39:54 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-14 09:39:54 +0000 |
commit | 307d7cb05d38eefc57e3d89e2b343c8a710f576f (patch) | |
tree | 2ce22b0f45a8a3de7db95f9e120d49df1acc2720 /enc | |
parent | 73d3336830f1f1f866df05e0b1ab2ba6c1fd4edf (diff) | |
download | ruby-307d7cb05d38eefc57e3d89e2b343c8a710f576f.tar.gz |
* include/ruby/oniguruma.h, enc/unicode.c: Adjusting flag assignments
and macros to work with unified CaseMappingSpecials array.
(with Kimihito Matsui)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc')
-rw-r--r-- | enc/unicode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/enc/unicode.c b/enc/unicode.c index d4b2c2c427..f4487e40d5 100644 --- a/enc/unicode.c +++ b/enc/unicode.c @@ -137,6 +137,7 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y) return 1; } +/* macros to shorten "enc/unicode/casefold.h", undefined immediately after including the file */ #define U ONIGENC_CASE_UPCASE #define D ONIGENC_CASE_DOWNCASE #define F ONIGENC_CASE_FOLD @@ -157,6 +158,12 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y) #undef I #undef L +/* macros related to ONIGENC_CASE flags */ +/* defined here because not used in other files */ +#define OnigSpecialIndexMask (((1<<OnigSpecialIndexWidth)-1)<<OnigSpecialIndexWidth) +#define OnigSpecialIndexEncode(n) (((n)<<OnigSpecialIndexShift)&OnigSpecialIndexMask) +#define OnigSpecialIndexDecode(n) (((n)&OnigSpecialIndexMask)>>OnigSpecialIndexShift) + #include "enc/unicode/name2ctype.h" #define CODE_RANGES_NUM numberof(CodeRanges) |