diff options
author | George Peter Banyard <girgias@php.net> | 2020-03-31 20:23:57 +0200 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2020-03-31 20:27:10 +0200 |
commit | daf45f68d25af0e7e909214719f3fbe0306abb7a (patch) | |
tree | 8ec13721e92a67875eeefadf1e1c8c4bcd8d53e6 /ext/mbstring/php_mbregex.c | |
parent | affc5a024a84d001f63e5cee935f06876029d528 (diff) | |
download | php-git-daf45f68d25af0e7e909214719f3fbe0306abb7a.tar.gz |
Use explicit helper
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r-- | ext/mbstring/php_mbregex.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 949cdb4bc1..2f50b5f618 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -845,7 +845,7 @@ PHP_FUNCTION(mb_regex_encoding) } if (!encoding) { - const char *retval = _php_mb_regex_mbctype2name(MBREX(current_mbctype)); + const char *retval = php_mb_regex_get_mbctype(); if (retval == NULL) { RETURN_FALSE; @@ -912,7 +912,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase) if (!php_mb_check_encoding( string, string_len, - _php_mb_regex_mbctype2name(MBREX(current_mbctype)) + php_mb_regex_get_mbctype() )) { RETURN_FALSE; } @@ -1020,7 +1020,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp { const char *current_enc_name; - current_enc_name = _php_mb_regex_mbctype2name(MBREX(current_mbctype)); + current_enc_name = php_mb_regex_get_mbctype(); if (current_enc_name == NULL || (enc = mbfl_name2encoding(current_enc_name)) == NULL) { php_error_docref(NULL, E_WARNING, "Unknown error"); @@ -1053,7 +1053,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp if (!php_mb_check_encoding( string, string_len, - _php_mb_regex_mbctype2name(MBREX(current_mbctype)) + php_mb_regex_get_mbctype() )) { RETURN_NULL(); } @@ -1260,8 +1260,7 @@ PHP_FUNCTION(mb_split) count--; } - if (!php_mb_check_encoding(string, string_len, - _php_mb_regex_mbctype2name(MBREX(current_mbctype)))) { + if (!php_mb_check_encoding(string, string_len, php_mb_regex_get_mbctype())) { RETURN_FALSE; } @@ -1355,8 +1354,7 @@ PHP_FUNCTION(mb_ereg_match) } } - if (!php_mb_check_encoding(string, string_len, - _php_mb_regex_mbctype2name(MBREX(current_mbctype)))) { + if (!php_mb_check_encoding(string, string_len, php_mb_regex_get_mbctype())) { RETURN_FALSE; } @@ -1568,7 +1566,7 @@ PHP_FUNCTION(mb_ereg_search_init) if (php_mb_check_encoding( ZSTR_VAL(arg_str), ZSTR_LEN(arg_str), - _php_mb_regex_mbctype2name(MBREX(current_mbctype)) + php_mb_regex_get_mbctype() )) { MBREX(search_pos) = 0; RETVAL_TRUE; |