com php-src: adapted the function args for ereg: ext/ereg/ereg.c

From: Date: Wed, 16 Oct 2013 10:09:51 +0000
Subject: com php-src: adapted the function args for ereg: ext/ereg/ereg.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73475@lists.php.net to get a copy of this message
Commit: d3f87d0ffce0cf95ede8fea237315985f6f5eee9 Author: Anatol Belski <ab@php.net> Thu, 22 Aug 2013 08:45:08 -0700 Parents: 179d696b350504650f7b498ba16f1bfaecee91ef Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d3f87d0ffce0cf95ede8fea237315985f6f5eee9 Log: adapted the function args for ereg And that actually seems to be it, all tests pass so far. So lets see how it goes in the fture, too easy but seems to be done for now . Changed paths: M ext/ereg/ereg.c Diff: diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index b2e6426..d958d0c 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -291,7 +291,7 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) zval **regex, /* Regular expression */ **array = NULL; /* Optional register array */ char *findin; /* String to apply expression to */ - int findin_len; + zend_str_size_int findin_len; regex_t re; regmatch_t *subs; int err, match_len, string_len; @@ -302,7 +302,7 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) char *string = NULL; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "Zs|Z", &regex, &findin, &findin_len, &array) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ZS|Z", &regex, &findin, &findin_len, &array) == FAILURE) { return; } @@ -555,9 +555,9 @@ static void php_do_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) char *string; char *replace; char *ret; - int arg_string_len; + zend_str_size_int arg_string_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZs", &arg_pattern, &arg_replace, &arg_string, &arg_string_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZS", &arg_pattern, &arg_replace, &arg_string, &arg_string_len) == FAILURE) { return; } @@ -632,10 +632,10 @@ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase) regex_t re; regmatch_t subs[1]; char *spliton, *str, *strp, *endp; - int spliton_len, str_len; + zend_str_size_int spliton_len, str_len; int err, size, copts = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &spliton, &spliton_len, &str, &str_len, &count) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|l", &spliton, &spliton_len, &str, &str_len, &count) == FAILURE) { return; } @@ -731,11 +731,11 @@ PHP_FUNCTION(spliti) PHP_EREG_API PHP_FUNCTION(sql_regcase) { char *string, *tmp; - int string_len; + zend_str_size_int string_len; unsigned char c; register int i, j; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &string, &string_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &string, &string_len) == FAILURE) { return; }

« previous php.cvs (#73475) next »