summaryrefslogtreecommitdiff
path: root/ext/mbstring/mbstring.h
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-04-16 16:35:35 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-04-17 14:05:53 +0200
commitf73f190c3f97479f735b97c22a8e4885344edca1 (patch)
tree625e71a2a24f578560492d93291df1dbaad28869 /ext/mbstring/mbstring.h
parent3ccd3aba90b4c0c95f1e0a457dbbc33c4524a4ed (diff)
downloadphp-git-f73f190c3f97479f735b97c22a8e4885344edca1.tar.gz
Fix internal_encoding fallback in mbstring
By introducing a hook that is called whenever one of internal_encoding / input_encoding / output_encoding changes, so that mbstring can adjust it's internal state. This also makes internal_encoding work with zend multibyte.
Diffstat (limited to 'ext/mbstring/mbstring.h')
-rw-r--r--ext/mbstring/mbstring.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h
index cd882c1c03..5a713e5496 100644
--- a/ext/mbstring/mbstring.h
+++ b/ext/mbstring/mbstring.h
@@ -130,9 +130,6 @@ MBSTRING_API size_t php_mb_mbchar_bytes(const char *s);
MBSTRING_API size_t php_mb_stripos(int mode, const char *old_haystack, size_t old_haystack_len, const char *old_needle, size_t old_needle_len, zend_long offset, zend_string *from_encoding);
MBSTRING_API int php_mb_check_encoding(const char *input, size_t length, const char *enc);
-/* internal use only */
-int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, size_t new_value_length);
-
ZEND_BEGIN_MODULE_GLOBALS(mbstring)
char *internal_encoding_name;
const mbfl_encoding *internal_encoding;
@@ -169,6 +166,10 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring)
#endif
zend_string *last_used_encoding_name;
const mbfl_encoding *last_used_encoding;
+ /* Whether an explicit internal_encoding / http_output / http_input encoding was set. */
+ zend_bool internal_encoding_set;
+ zend_bool http_output_set;
+ zend_bool http_input_set;
ZEND_END_MODULE_GLOBALS(mbstring)
#define MB_OVERLOAD_MAIL 1