com php-src: fixed the mb_regex* stuff: ext/mbstring/ph p_mbregex.c

From: Date: Wed, 16 Oct 2013 10:14:18 +0000
Subject: com php-src: fixed the mb_regex* stuff: ext/mbstring/ph p_mbregex.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73457@lists.php.net to get a copy of this message
Commit: 9e4a7835c5940658d475558590a869fe3f17d8bc Author: Anatol Belski <ab@php.net> Sat, 24 Aug 2013 03:24:06 -0700 Parents: 1f261538e8c222093fe28bd3e4bf9f9ef1f4f946 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9e4a7835c5940658d475558590a869fe3f17d8bc Log: fixed the mb_regex* stuff Changed paths: M ext/mbstring/php_mbregex.c Diff: diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 67dab34..f331fab 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -657,10 +657,10 @@ PHP_FUNCTION(mb_regex_encoding) { size_t argc = ZEND_NUM_ARGS(); char *encoding; - int encoding_len; + zend_str_size_int encoding_len; OnigEncoding mbctype; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &encoding, &encoding_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|S", &encoding, &encoding_len) == FAILURE) { return; } @@ -691,7 +691,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase) { zval **arg_pattern, *array; char *string; - int string_len; + zend_str_size_int string_len; php_mb_regex_t *re; OnigRegion *regs = NULL; int i, match_len, beg, end; @@ -700,7 +700,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase) array = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zs|z", &arg_pattern, &string, &string_len, &array) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZS|z", &arg_pattern, &string, &string_len, &array) == FAILURE) { RETURN_FALSE; } @@ -789,16 +789,16 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp zval **arg_pattern_zval; char *arg_pattern; - int arg_pattern_len; + zend_str_size_int arg_pattern_len; char *replace; - int replace_len; + zend_str_size_int replace_len; zend_fcall_info arg_replace_fci; zend_fcall_info_cache arg_replace_fci_cache; char *string; - int string_len; + zend_str_size_int string_len; char *p; php_mb_regex_t *re; @@ -827,10 +827,10 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp eval = 0; { char *option_str = NULL; - int option_str_len = 0; + zend_str_size_int option_str_len = 0; if (!is_callable) { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zss|s", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZSS|S", &arg_pattern_zval, &replace, &replace_len, &string, &string_len, @@ -838,7 +838,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp RETURN_FALSE; } } else { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zfs|s", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZfS|S", &arg_pattern_zval, &arg_replace_fci, &arg_replace_fci_cache, &string, &string_len, @@ -1051,17 +1051,17 @@ PHP_FUNCTION(mb_ereg_replace_callback) PHP_FUNCTION(mb_split) { char *arg_pattern; - int arg_pattern_len; + zend_str_size_int arg_pattern_len; php_mb_regex_t *re; OnigRegion *regs = NULL; char *string; OnigUChar *pos, *chunk_pos; - int string_len; + zend_str_size_int string_len; int n, err; long count = -1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &arg_pattern, &arg_pattern_len, &string, &string_len, &count) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|l", &arg_pattern, &arg_pattern_len, &string, &string_len, &count) == FAILURE) { RETURN_FALSE; } @@ -1130,10 +1130,10 @@ PHP_FUNCTION(mb_split) PHP_FUNCTION(mb_ereg_match) { char *arg_pattern; - int arg_pattern_len; + zend_str_size_int arg_pattern_len; char *string; - int string_len; + zend_str_size_int string_len; php_mb_regex_t *re; OnigSyntaxType *syntax; @@ -1142,9 +1142,9 @@ PHP_FUNCTION(mb_ereg_match) { char *option_str = NULL; - int option_str_len = 0; + zend_str_size_int option_str_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|s", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|S", &arg_pattern, &arg_pattern_len, &string, &string_len, &option_str, &option_str_len)==FAILURE) { RETURN_FALSE; @@ -1179,13 +1179,13 @@ _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode) { size_t argc = ZEND_NUM_ARGS(); char *arg_pattern, *arg_options; - int arg_pattern_len, arg_options_len; + zend_str_size_int arg_pattern_len, arg_options_len; int n, i, err, pos, len, beg, end; OnigOptionType option; OnigUChar *str; OnigSyntaxType *syntax; - if (zend_parse_parameters(argc TSRMLS_CC, "|ss", &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "|SS", &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) { return; } @@ -1310,11 +1310,11 @@ PHP_FUNCTION(mb_ereg_search_init) size_t argc = ZEND_NUM_ARGS(); zval *arg_str; char *arg_pattern = NULL, *arg_options = NULL; - int arg_pattern_len = 0, arg_options_len = 0; + zend_str_size_int arg_pattern_len = 0, arg_options_len = 0; OnigSyntaxType *syntax = NULL; OnigOptionType option; - if (zend_parse_parameters(argc TSRMLS_CC, "z|ss", &arg_str, &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "z|SS", &arg_str, &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) { return; } @@ -1436,10 +1436,10 @@ PHP_FUNCTION(mb_regex_set_options) OnigOptionType opt; OnigSyntaxType *syntax; char *string = NULL; - int string_len; + zend_str_size_int string_len; char buf[16]; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|S", &string, &string_len) == FAILURE) { RETURN_FALSE; }

« previous php.cvs (#73457) next »