summaryrefslogtreecommitdiff
path: root/ext/mbstring/libmbfl
diff options
context:
space:
mode:
authorAlex Dowad <alexinbeijing@gmail.com>2020-10-13 07:58:53 +0200
committerAlex Dowad <alexinbeijing@gmail.com>2020-11-25 19:52:19 +0200
commitbbbadae0ae01a6bf08e459269e849bea2baf5114 (patch)
treec2d119cd92e1dc3ce3e64b4e9bb84087eb537d05 /ext/mbstring/libmbfl
parent72660c416adebb07e1dd3b1fefdbcef65bb62753 (diff)
downloadphp-git-bbbadae0ae01a6bf08e459269e849bea2baf5114.tar.gz
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?)
Diffstat (limited to 'ext/mbstring/libmbfl')
-rw-r--r--ext/mbstring/libmbfl/filters/mbfilter_utf16.c6
-rw-r--r--ext/mbstring/libmbfl/mbfl/mbfl_consts.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c
index 10063883f2..c2c30973db 100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c
+++ b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c
@@ -40,7 +40,7 @@ const mbfl_encoding mbfl_encoding_utf16 = {
"UTF-16",
mbfl_encoding_utf16_aliases,
NULL,
- MBFL_ENCTYPE_MWC2BE,
+ MBFL_ENCTYPE_MWC2,
&vtbl_utf16_wchar,
&vtbl_wchar_utf16
};
@@ -51,7 +51,7 @@ const mbfl_encoding mbfl_encoding_utf16be = {
"UTF-16BE",
NULL,
NULL,
- MBFL_ENCTYPE_MWC2BE,
+ MBFL_ENCTYPE_MWC2,
&vtbl_utf16be_wchar,
&vtbl_wchar_utf16be
};
@@ -62,7 +62,7 @@ const mbfl_encoding mbfl_encoding_utf16le = {
"UTF-16LE",
NULL,
NULL,
- MBFL_ENCTYPE_MWC2LE,
+ MBFL_ENCTYPE_MWC2,
&vtbl_utf16le_wchar,
&vtbl_wchar_utf16le
};
diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h
index 25d2ea0235..137cd0fcb8 100644
--- a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h
+++ b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h
@@ -34,8 +34,7 @@
#define MBFL_ENCTYPE_SBCS 0x00000001 /* single-byte encoding */
#define MBFL_ENCTYPE_MBCS 0x00000002 /* multi-byte encoding */
#define MBFL_ENCTYPE_WCS2 0x00000010 /* 2 bytes/char */
-#define MBFL_ENCTYPE_MWC2BE 0x00000040 /* 2+ bytes/char, big endian */
-#define MBFL_ENCTYPE_MWC2LE 0x00000080 /* 2+ bytes/char, little endian */
+#define MBFL_ENCTYPE_MWC2 0x00000040 /* 2+ bytes/char */
#define MBFL_ENCTYPE_WCS4 0x00000100 /* 4 bytes/char */
#define MBFL_ENCTYPE_GL_UNSAFE 0x00004000