tony2001 Thu Aug 31 11:17:37 2006 UTC Modified files: /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.138&r2=1.139&diff_format=u Index: php-src/ext/iconv/iconv.c diff -u php-src/ext/iconv/iconv.c:1.138 php-src/ext/iconv/iconv.c:1.139 --- php-src/ext/iconv/iconv.c:1.138 Wed Aug 30 16:12:27 2006 +++ php-src/ext/iconv/iconv.c Thu Aug 31 11:17:37 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iconv.c,v 1.138 2006/08/30 16:12:27 tony2001 Exp $ */ +/* $Id: iconv.c,v 1.139 2006/08/31 11:17:37 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1886,7 +1886,6 @@ char *str; int str_len; long offset, length; - zval *len_z = NULL; php_iconv_err_t err; @@ -1894,17 +1893,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);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php