mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* enc/unicode.c: Fixed two macro definitions.
* test/ruby/enc/test_case_mapping.rb: Test cases that detected the above bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
551f6b3a18
commit
fdbb82967f
3 changed files with 14 additions and 2 deletions
|
@ -147,7 +147,7 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y)
|
|||
#define SpecialsCodepointExtract(n) ((n)&((1<<SpecialsLengthOffset)-1))
|
||||
#define SpecialsLengthEncode(n) ((n)<<SpecialsLengthOffset)
|
||||
|
||||
#define OnigSpecialIndexMask (((1<<OnigSpecialIndexWidth)-1)<<OnigSpecialIndexWidth)
|
||||
#define OnigSpecialIndexMask (((1<<OnigSpecialIndexWidth)-1)<<OnigSpecialIndexShift)
|
||||
#define OnigSpecialIndexEncode(n) ((n)<<OnigSpecialIndexShift)
|
||||
#define OnigSpecialIndexDecode(n) (((n)&OnigSpecialIndexMask)>>OnigSpecialIndexShift)
|
||||
|
||||
|
@ -158,7 +158,7 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y)
|
|||
#define ST ONIGENC_CASE_TITLECASE
|
||||
#define SU ONIGENC_CASE_UP_SPECIAL
|
||||
#define SL ONIGENC_CASE_DOWN_SPECIAL
|
||||
#define I(n) 0
|
||||
#define I(n) OnigSpecialIndexEncode(n)
|
||||
#define L(n) SpecialsLengthEncode(n)
|
||||
|
||||
#include "enc/unicode/casefold.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue