Skip to content

Commit bbbadae

Browse files
committed
Combine MBFL_ENCTYPE_MWC2{BE,LE} constants
These constants indicate that a text encoding uses 2+ bytes for each character, and is either big endian or little endian (respectively). But nothing in mbstring cares about the difference between MBFL_ENCTYPE_MWC2BE and MBFL_ENCTYPE_MWC2LE. (Actually, nothing cares about whether these flags are set at all... maybe we should just remove them?)
1 parent 72660c4 commit bbbadae

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

ext/mbstring/libmbfl/filters/mbfilter_utf16.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const mbfl_encoding mbfl_encoding_utf16 = {
4040
"UTF-16",
4141
mbfl_encoding_utf16_aliases,
4242
NULL,
43-
MBFL_ENCTYPE_MWC2BE,
43+
MBFL_ENCTYPE_MWC2,
4444
&vtbl_utf16_wchar,
4545
&vtbl_wchar_utf16
4646
};
@@ -51,7 +51,7 @@ const mbfl_encoding mbfl_encoding_utf16be = {
5151
"UTF-16BE",
5252
NULL,
5353
NULL,
54-
MBFL_ENCTYPE_MWC2BE,
54+
MBFL_ENCTYPE_MWC2,
5555
&vtbl_utf16be_wchar,
5656
&vtbl_wchar_utf16be
5757
};
@@ -62,7 +62,7 @@ const mbfl_encoding mbfl_encoding_utf16le = {
6262
"UTF-16LE",
6363
NULL,
6464
NULL,
65-
MBFL_ENCTYPE_MWC2LE,
65+
MBFL_ENCTYPE_MWC2,
6666
&vtbl_utf16le_wchar,
6767
&vtbl_wchar_utf16le
6868
};

ext/mbstring/libmbfl/mbfl/mbfl_consts.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
#define MBFL_ENCTYPE_SBCS 0x00000001 /* single-byte encoding */
3535
#define MBFL_ENCTYPE_MBCS 0x00000002 /* multi-byte encoding */
3636
#define MBFL_ENCTYPE_WCS2 0x00000010 /* 2 bytes/char */
37-
#define MBFL_ENCTYPE_MWC2BE 0x00000040 /* 2+ bytes/char, big endian */
38-
#define MBFL_ENCTYPE_MWC2LE 0x00000080 /* 2+ bytes/char, little endian */
37+
#define MBFL_ENCTYPE_MWC2 0x00000040 /* 2+ bytes/char */
3938
#define MBFL_ENCTYPE_WCS4 0x00000100 /* 4 bytes/char */
4039
#define MBFL_ENCTYPE_GL_UNSAFE 0x00004000
4140

0 commit comments

Comments
 (0)