cvs: php-src(PHP_5_2) /ext/iconv iconv.c

From: Date: Thu, 31 Aug 2006 11:17:47 +0000
Subject: cvs: php-src(PHP_5_2) /ext/iconv iconv.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-40228@lists.php.net to get a copy of this message
tony2001 Thu Aug 31 11:17:47 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/iconv iconv.c Log: minor changes in iconv_substr() to avoid zval converting http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.124.2.8.2.3&r2=1.124.2.8.2.4&diff_format=u Index: php-src/ext/iconv/iconv.c diff -u php-src/ext/iconv/iconv.c:1.124.2.8.2.3 php-src/ext/iconv/iconv.c:1.124.2.8.2.4 --- php-src/ext/iconv/iconv.c:1.124.2.8.2.3 Wed Aug 30 16:12:43 2006 +++ php-src/ext/iconv/iconv.c Thu Aug 31 11:17:47 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iconv.c,v 1.124.2.8.2.3 2006/08/30 16:12:43 tony2001 Exp $ */ +/* $Id: iconv.c,v 1.124.2.8.2.4 2006/08/31 11:17:47 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1883,7 +1883,6 @@ char *str; int str_len; long offset, length; - zval *len_z = NULL; php_iconv_err_t err; @@ -1891,17 +1890,14 @@ charset = ICONVG(internal_encoding); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|zs", - &str, &str_len, &offset, &len_z, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|ls", + &str, &str_len, &offset, &length, &charset, &charset_len) == FAILURE) { RETURN_FALSE; } - if (len_z == NULL) { + if (ZEND_NUM_ARGS() < 3) { length = str_len; - } else { - convert_to_long_ex(&len_z); - length = Z_LVAL_P(len_z); } err = _php_iconv_substr(&retval, str, str_len, offset, length, charset);

« previous php.cvs (#40228) next »