[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Thu Apr 2 01:35:52 2009 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3361r2=1.3362diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.3361 php-src/ChangeLog:1.3362 --- php-src/ChangeLog:1.3361Wed Apr 1 01:32:41 2009 +++ php-src/ChangeLog Thu Apr 2 01:35:49 2009 @@ -1,3 +1,123 @@ +2009-04-01 Matt Wilmas php_li...@realplain.com + +* (PHP_5_2) + NEWS + ext/standard/string.c + ext/standard/tests/strings/bug47546.phpt: + MFH: Fixed bug #47560 (explode()'s limit parameter odd behaviour) by + reverting change for bug #47546 + +* (PHP_5_3) + NEWS + ext/standard/php_string.h + ext/standard/string.c + ext/standard/tests/strings/bug47546.phpt: + MFH: explode() stuff: + - Fixed bug #47560 (explode()'s limit parameter odd behaviour) by + reverting change for bug #47546 + - Changed int to long where needed (should fix memory errors from overflow + seen in bug #47854) + - Simplified logic a bit with limit and its default value + - php_explode_negative_limit(): removed safe_emalloc (not needed; plain + erealloc is used later) + - Moved declarations/allocation to optimize if the delimiter isn't found + - Changed ALLOC_STEP size for less realloc's (and maybe better memory + block alignment?) + +* ext/standard/php_string.h + ext/standard/string.c + ext/standard/tests/strings/bug47546.phpt: + explode() stuff: + - Fixed bug #47560 (explode()'s limit parameter odd behaviour) by + reverting change for bug #47546 + - Changed int to long where needed (should fix memory errors from overflow + seen in bug #47854) + - Simplified logic a bit with limit and its default value + - php_explode_negative_limit(): removed safe_emalloc (not needed; plain + erealloc is used later) + - Moved declarations/allocation to optimize if the delimiter isn't found + - Changed ALLOC_STEP size for less realloc's (and maybe better memory + block alignment?) + +2009-04-01 Felipe Pena felipe...@gmail.com + +* (PHP_5_2) + ZendEngine2/zend_alloc.c + ZendEngine2/zend_alloc.c: + - MFH: Fixed bug #47852 (Compilation failure in zend_alloc.c) (Matteo) + +* ZendEngine2/zend_alloc.c: + - Fixed bug #47852 (Compilation failure in zend_alloc.c) (Matteo) + +2009-04-01 Pierre-Alain Joye pierre@gmail.com + +* ext/pdo_pgsql/config.w32: + - 8.3.x supports pqprepare + +* ext/pdo_pgsql/pgsql_driver.c: + - MFB: fix build when pqprepare does not exist + +* (PHP_5_3) + ext/pdo_pgsql/pgsql_driver.c: + - fix build when pqprepare does not exist + +2009-04-01 Takeshi Abe t...@fixedpoint.jp + +* (PHP_5_3) + ext/gd/libgd/gd_png.c: + MFH: + replaced static gdPngJmpbufStruct, which is afraid of being shared with + several threads, by a couple of auto variables. + +* ext/gd/libgd/gd_png.c: + replaced static gdPngJmpbufStruct, which is afraid of being shared with + several threads, by a couple of auto variables. + +2009-04-01 Alexey Zakhlestin indey...@gmail.com + +* (PHP_5_3) + ext/pdo_sqlite/sqlite_statement.c: + MFH: reverted previous patch, using explicit cast instead + +* ext/pdo_sqlite/sqlite_statement.c: + reverted previous patch, using explicit cast instead + +2009-04-01 Ilia Alshanetsky i...@prohost.org + +* (PHP_5_3) + NEWS + ext/standard/string.c: + + Fixed bug #47856 (stristr() converts needle to lower-case). + +2009-04-01 Alexey Zakhlestin indey...@gmail.com + +* (PHP_5_3) + ext/pdo_sqlite/sqlite_statement.c: + MFH: const pointer was used in non-const context + +* ext/pdo_sqlite/sqlite_statement.c: + const pointer was used in non-const context + +2009-04-01 Kalle Sommer Nielsen kalle@gmail.com + +* ext/soap/php_packet_soap.c: + Fixed Windows build + +* (PHP_5_3) + win32/build/mkdist.php: + MFH: + Fixed a few warnings from copy(): + * If $item is empty then skip to next entry, this fixes the The first + argument cannot be a directory warnings + * If file does not exist then dont try to copy it + +* win32/build/mkdist.php: + Fixed a few warnings from copy(): + * If $item is empty then skip to next entry, this fixes the The first + argument cannot be a directory warnings + * If file does not exist then dont try to copy it + 2009-03-31 Pierre-Alain Joye pierre@gmail.com * ext/gd/php_gd.h: @@ -34731,7 +34851,7 @@ * sapi/litespeed/lsapi_main.c sapi/litespeed/lsapilib.c: - - Added missing $Id: ChangeLog,v 1.3361 2009/04/01 01:32:41 changelog Exp $ tags and nuked c++ comments + - Added missing $Id: ChangeLog,v 1.3362 2009/04/02 01:35:49 changelog Exp $ tags and
[PHP-CVS] cvs: php-src(PHP_5_3) /win32/build mkdist.php
kalle Wed Apr 1 09:21:31 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/win32/buildmkdist.php Log: MFH: Fixed a few warnings from copy(): * If $item is empty then skip to next entry, this fixes the The first argument cannot be a directory warnings * If file does not exist then dont try to copy it http://cvs.php.net/viewvc.cgi/php-src/win32/build/mkdist.php?r1=1.13.4.1.2.9r2=1.13.4.1.2.10diff_format=u Index: php-src/win32/build/mkdist.php diff -u php-src/win32/build/mkdist.php:1.13.4.1.2.9 php-src/win32/build/mkdist.php:1.13.4.1.2.10 --- php-src/win32/build/mkdist.php:1.13.4.1.2.9 Mon Mar 30 14:32:52 2009 +++ php-src/win32/build/mkdist.php Wed Apr 1 09:21:31 2009 @@ -1,4 +1,4 @@ -?php # $Id: mkdist.php,v 1.13.4.1.2.9 2009/03/30 14:32:52 kalle Exp $ +?php # $Id: mkdist.php,v 1.13.4.1.2.10 2009/04/01 09:21:31 kalle Exp $ /* piece together a windows binary distro */ $build_dir = $argv[1]; @@ -112,6 +112,13 @@ global $is_debug, $dist_dir; foreach ($list as $item) { + if (empty($item)) { + continue; + } elseif (!is_file($source_dir . DIRECTORY_SEPARATOR . $item)) { + echo WARNING: $item not found\n; + continue; + } + echo Copying $item from $source_dir to $dest_dir\n; copy($source_dir . DIRECTORY_SEPARATOR . $item, $dest_dir . DIRECTORY_SEPARATOR . $item); if ($is_debug) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap php_packet_soap.c
kalle Wed Apr 1 09:38:42 2009 UTC Modified files: /php-src/ext/soap php_packet_soap.c Log: Fixed Windows build http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_packet_soap.c?r1=1.56r2=1.57diff_format=u Index: php-src/ext/soap/php_packet_soap.c diff -u php-src/ext/soap/php_packet_soap.c:1.56 php-src/ext/soap/php_packet_soap.c:1.57 --- php-src/ext/soap/php_packet_soap.c:1.56 Thu Mar 26 20:02:12 2009 +++ php-src/ext/soap/php_packet_soap.c Wed Apr 1 09:38:41 2009 @@ -17,7 +17,7 @@ | Dmitry Stogov dmi...@zend.com | +--+ */ -/* $Id: php_packet_soap.c,v 1.56 2009/03/26 20:02:12 felipe Exp $ */ +/* $Id: php_packet_soap.c,v 1.57 2009/04/01 09:38:41 kalle Exp $ */ #include php_soap.h @@ -256,6 +256,10 @@ res_count = zend_hash_num_elements(fn-responseParameters); zend_hash_internal_pointer_reset(fn-responseParameters); while (zend_hash_get_current_data(fn-responseParameters, (void **)h_param) == SUCCESS) { + UErrorCode status = U_ZERO_ERROR; + zstr u_name; + int u_name_len; + param = (*h_param); if (fnb-style == SOAP_DOCUMENT) { if (param-element) { @@ -318,9 +322,6 @@ tmp = master_to_zval(NULL, val); } } - UErrorCode status = U_ZERO_ERROR; - zstr u_name; - int u_name_len; zend_string_to_unicode_ex(UG(utf8_conv), u_name.u, u_name_len, param-paramName, strlen(param-paramName), status); add_u_assoc_zval_ex(return_value, IS_UNICODE, u_name, u_name_len+1, tmp); efree(u_name.u); @@ -396,6 +397,9 @@ if (trav-type == XML_ELEMENT_NODE) { encodePtr enc = NULL; zval* val; + UErrorCode status = U_ZERO_ERROR; + zstr u_name; + int u_name_len; if (hdrs) { smart_str key = {0}; @@ -413,9 +417,6 @@ smart_str_free(key); } val = master_to_zval(enc, trav); - UErrorCode status = U_ZERO_ERROR; - zstr u_name; - int u_name_len; zend_string_to_unicode_ex(UG(utf8_conv), u_name.u, u_name_len, (char*)trav-name, strlen((char*)trav-name), status); add_u_assoc_zval_ex(soap_headers, IS_UNICODE, u_name, u_name_len+1, val); efree(u_name.u); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /win32/build mkdist.php
kalle Wed Apr 1 09:20:35 2009 UTC Modified files: /php-src/win32/buildmkdist.php Log: Fixed a few warnings from copy(): * If $item is empty then skip to next entry, this fixes the The first argument cannot be a directory warnings * If file does not exist then dont try to copy it http://cvs.php.net/viewvc.cgi/php-src/win32/build/mkdist.php?r1=1.22r2=1.23diff_format=u Index: php-src/win32/build/mkdist.php diff -u php-src/win32/build/mkdist.php:1.22 php-src/win32/build/mkdist.php:1.23 --- php-src/win32/build/mkdist.php:1.22 Mon Mar 30 14:32:20 2009 +++ php-src/win32/build/mkdist.php Wed Apr 1 09:20:35 2009 @@ -1,4 +1,4 @@ -?php # $Id: mkdist.php,v 1.22 2009/03/30 14:32:20 kalle Exp $ +?php # $Id: mkdist.php,v 1.23 2009/04/01 09:20:35 kalle Exp $ /* piece together a windows binary distro */ $build_dir = $argv[1]; @@ -112,6 +112,13 @@ global $is_debug, $dist_dir; foreach ($list as $item) { + if (empty($item)) { + continue; + } elseif (!is_file($source_dir . DIRECTORY_SEPARATOR . $item)) { + echo WARNING: $item not found\n; + continue; + } + echo Copying $item from $source_dir to $dest_dir\n; copy($source_dir . DIRECTORY_SEPARATOR . $item, $dest_dir . DIRECTORY_SEPARATOR . $item); if ($is_debug) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo_sqlite sqlite_statement.c
indeyetsWed Apr 1 11:31:54 2009 UTC Modified files: /php-src/ext/pdo_sqlite sqlite_statement.c Log: const pointer was used in non-const context http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.29r2=1.30diff_format=u Index: php-src/ext/pdo_sqlite/sqlite_statement.c diff -u php-src/ext/pdo_sqlite/sqlite_statement.c:1.29 php-src/ext/pdo_sqlite/sqlite_statement.c:1.30 --- php-src/ext/pdo_sqlite/sqlite_statement.c:1.29 Tue Mar 10 23:39:31 2009 +++ php-src/ext/pdo_sqlite/sqlite_statement.c Wed Apr 1 11:31:54 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite_statement.c,v 1.29 2009/03/10 23:39:31 helly Exp $ */ +/* $Id: sqlite_statement.c,v 1.30 2009/04/01 11:31:54 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -282,6 +282,8 @@ static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_value TSRMLS_DC) { pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt-driver_data; + const char *_str; + size_t _str_len; char *str; zval *flags; @@ -318,14 +320,20 @@ break; } - str = (char*)sqlite3_column_decltype(S-stmt, colno); - if (str) { + _str = sqlite3_column_decltype(S-stmt, colno); + _str_len = strlen(_str); + if (_str) { + str = emalloc(_str_len); + strcpy(str, _str); add_assoc_string(return_value, sqlite:decl_type, str, 1); } #ifdef SQLITE_ENABLE_COLUMN_METADATA - str = sqlite3_column_table_name(S-stmt, colno); - if (str) { + _str = sqlite3_column_table_name(S-stmt, colno); + _str_len = strlen(_str); + if (_str) { + str = emalloc(_str_len); + strcpy(str, _str); add_assoc_string(return_value, table, str, 1); } #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: cvs: php-src /ext/pdo_sqlite sqlite_statement.c
It's valid to discard the const qualifier, add_assoc_string runs estrndup to take a copy of the return value anyway. You've also made the code less readable and introduced a memory leak for str. So unless I've missed something can you revert this please. Scott Alexey Zakhlestin wrote: indeyets Wed Apr 1 11:31:54 2009 UTC Modified files: /php-src/ext/pdo_sqlite sqlite_statement.c Log: const pointer was used in non-const context http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.29r2=1.30diff_format=u Index: php-src/ext/pdo_sqlite/sqlite_statement.c diff -u php-src/ext/pdo_sqlite/sqlite_statement.c:1.29 php-src/ext/pdo_sqlite/sqlite_statement.c:1.30 --- php-src/ext/pdo_sqlite/sqlite_statement.c:1.29Tue Mar 10 23:39:31 2009 +++ php-src/ext/pdo_sqlite/sqlite_statement.c Wed Apr 1 11:31:54 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite_statement.c,v 1.29 2009/03/10 23:39:31 helly Exp $ */ +/* $Id: sqlite_statement.c,v 1.30 2009/04/01 11:31:54 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -282,6 +282,8 @@ static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_value TSRMLS_DC) { pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt-driver_data; + const char *_str; + size_t _str_len; char *str; zval *flags; @@ -318,14 +320,20 @@ break; } - str = (char*)sqlite3_column_decltype(S-stmt, colno); - if (str) { + _str = sqlite3_column_decltype(S-stmt, colno); + _str_len = strlen(_str); + if (_str) { + str = emalloc(_str_len); + strcpy(str, _str); add_assoc_string(return_value, sqlite:decl_type, str, 1); } #ifdef SQLITE_ENABLE_COLUMN_METADATA - str = sqlite3_column_table_name(S-stmt, colno); - if (str) { + _str = sqlite3_column_table_name(S-stmt, colno); + _str_len = strlen(_str); + if (_str) { + str = emalloc(_str_len); + strcpy(str, _str); add_assoc_string(return_value, table, str, 1); } #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard string.c
iliaa Wed Apr 1 14:00:39 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard string.c Log: Fixed bug #47856 (stristr() converts needle to lower-case). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.547r2=1.2027.2.547.2.965.2.548diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.547 php-src/NEWS:1.2027.2.547.2.965.2.548 --- php-src/NEWS:1.2027.2.547.2.965.2.547 Tue Mar 31 14:26:19 2009 +++ php-src/NEWSWed Apr 1 14:00:35 2009 @@ -4,6 +4,7 @@ - Undeprecated ticks. (Arnaud) - Upgraded bundled sqlite to version 3.6.12. (Scott) +- Fixed bug #47856 (stristr() converts needle to lower-case). (Ilia) - Fixed bug #47819 (Getting pdo_mysql.so: undefined symbol: mysqlnd_debug_init at startup). (Johannes) - Fixed bug #47816 (pcntl tests failing on NetBSD). (Matteo) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.44r2=1.445.2.14.2.69.2.45diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.44 php-src/ext/standard/string.c:1.445.2.14.2.69.2.45 --- php-src/ext/standard/string.c:1.445.2.14.2.69.2.44 Tue Mar 17 00:02:39 2009 +++ php-src/ext/standard/string.c Wed Apr 1 14:00:38 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.445.2.14.2.69.2.44 2009/03/17 00:02:39 mattwil Exp $ */ +/* $Id: string.c,v 1.445.2.14.2.69.2.45 2009/04/01 14:00:38 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1595,13 +1595,15 @@ haystack_orig = estrndup(Z_STRVAL_PP(haystack), Z_STRLEN_PP(haystack)); if (Z_TYPE_PP(needle) == IS_STRING) { + char *orig_needle; if (!Z_STRLEN_PP(needle)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty delimiter); efree(haystack_orig); RETURN_FALSE; } - - found = php_stristr(Z_STRVAL_PP(haystack), Z_STRVAL_PP(needle), Z_STRLEN_PP(haystack), Z_STRLEN_PP(needle)); + orig_needle = estrndup(Z_STRVAL_PP(needle), Z_STRLEN_PP(needle)); + found = php_stristr(Z_STRVAL_PP(haystack), orig_needle, Z_STRLEN_PP(haystack), Z_STRLEN_PP(needle)); + efree(orig_needle); } else { SEPARATE_ZVAL(needle); convert_to_long(*needle); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo_sqlite sqlite_statement.c
indeyetsWed Apr 1 14:34:21 2009 UTC Modified files: /php-src/ext/pdo_sqlite sqlite_statement.c Log: reverted previous patch, using explicit cast instead http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.30r2=1.31diff_format=u Index: php-src/ext/pdo_sqlite/sqlite_statement.c diff -u php-src/ext/pdo_sqlite/sqlite_statement.c:1.30 php-src/ext/pdo_sqlite/sqlite_statement.c:1.31 --- php-src/ext/pdo_sqlite/sqlite_statement.c:1.30 Wed Apr 1 11:31:54 2009 +++ php-src/ext/pdo_sqlite/sqlite_statement.c Wed Apr 1 14:34:21 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite_statement.c,v 1.30 2009/04/01 11:31:54 indeyets Exp $ */ +/* $Id: sqlite_statement.c,v 1.31 2009/04/01 14:34:21 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -282,9 +282,7 @@ static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_value TSRMLS_DC) { pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt-driver_data; - const char *_str; - size_t _str_len; - char *str; + const char *str; zval *flags; if (!S-stmt) { @@ -320,21 +318,15 @@ break; } - _str = sqlite3_column_decltype(S-stmt, colno); - _str_len = strlen(_str); - if (_str) { - str = emalloc(_str_len); - strcpy(str, _str); - add_assoc_string(return_value, sqlite:decl_type, str, 1); + str = sqlite3_column_decltype(S-stmt, colno); + if (str) { + add_assoc_string(return_value, sqlite:decl_type, (char *)str, 1); } #ifdef SQLITE_ENABLE_COLUMN_METADATA - _str = sqlite3_column_table_name(S-stmt, colno); - _str_len = strlen(_str); - if (_str) { - str = emalloc(_str_len); - strcpy(str, _str); - add_assoc_string(return_value, table, str, 1); + str = sqlite3_column_table_name(S-stmt, colno); + if (str) { + add_assoc_string(return_value, table, (char *)str, 1); } #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo_sqlite sqlite_statement.c
indeyetsWed Apr 1 14:35:24 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pdo_sqlite sqlite_statement.c Log: MFH: reverted previous patch, using explicit cast instead http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.18.2.4.2.3.2.5r2=1.18.2.4.2.3.2.6diff_format=u Index: php-src/ext/pdo_sqlite/sqlite_statement.c diff -u php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.3.2.5 php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.3.2.6 --- php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.3.2.5 Wed Apr 1 11:32:14 2009 +++ php-src/ext/pdo_sqlite/sqlite_statement.c Wed Apr 1 14:35:24 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite_statement.c,v 1.18.2.4.2.3.2.5 2009/04/01 11:32:14 indeyets Exp $ */ +/* $Id: sqlite_statement.c,v 1.18.2.4.2.3.2.6 2009/04/01 14:35:24 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -282,9 +282,7 @@ static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_value TSRMLS_DC) { pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt-driver_data; - const char *_str; - size_t _str_len; - char *str; + const char *str; zval *flags; if (!S-stmt) { @@ -320,21 +318,15 @@ break; } - _str = sqlite3_column_decltype(S-stmt, colno); - _str_len = strlen(_str); - if (_str) { - str = emalloc(_str_len); - strcpy(str, _str); - add_assoc_string(return_value, sqlite:decl_type, str, 1); + str = sqlite3_column_decltype(S-stmt, colno); + if (str) { + add_assoc_string(return_value, sqlite:decl_type, (char *)str, 1); } #ifdef SQLITE_ENABLE_COLUMN_METADATA - _str = sqlite3_column_table_name(S-stmt, colno); - _str_len = strlen(_str); - if (_str) { - str = emalloc(_str_len); - strcpy(str, _str); - add_assoc_string(return_value, table, str, 1); + str = sqlite3_column_table_name(S-stmt, colno); + if (str) { + add_assoc_string(return_value, table, (char *)str, 1); } #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: cvs: php-src /ext/pdo_sqlite sqlite_statement.c
2009/4/1 Scott MacVicar scott...@php.net: It's valid to discard the const qualifier, add_assoc_string runs estrndup to take a copy of the return value anyway. You've also made the code less readable and introduced a memory leak for str. So unless I've missed something can you revert this please. done. Used explicit cast to (char *) instead. Scott Alexey Zakhlestin wrote: indeyets Wed Apr 1 11:31:54 2009 UTC Modified files: /php-src/ext/pdo_sqlite sqlite_statement.c Log: const pointer was used in non-const context http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.29r2=1.30diff_format=u Index: php-src/ext/pdo_sqlite/sqlite_statement.c diff -u php-src/ext/pdo_sqlite/sqlite_statement.c:1.29 php-src/ext/pdo_sqlite/sqlite_statement.c:1.30 --- php-src/ext/pdo_sqlite/sqlite_statement.c:1.29 Tue Mar 10 23:39:31 2009 +++ php-src/ext/pdo_sqlite/sqlite_statement.c Wed Apr 1 11:31:54 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite_statement.c,v 1.29 2009/03/10 23:39:31 helly Exp $ */ +/* $Id: sqlite_statement.c,v 1.30 2009/04/01 11:31:54 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -282,6 +282,8 @@ static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_value TSRMLS_DC) { pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt-driver_data; + const char *_str; + size_t _str_len; char *str; zval *flags; @@ -318,14 +320,20 @@ break; } - str = (char*)sqlite3_column_decltype(S-stmt, colno); - if (str) { + _str = sqlite3_column_decltype(S-stmt, colno); + _str_len = strlen(_str); + if (_str) { + str = emalloc(_str_len); + strcpy(str, _str); add_assoc_string(return_value, sqlite:decl_type, str, 1); } #ifdef SQLITE_ENABLE_COLUMN_METADATA - str = sqlite3_column_table_name(S-stmt, colno); - if (str) { + _str = sqlite3_column_table_name(S-stmt, colno); + _str_len = strlen(_str); + if (_str) { + str = emalloc(_str_len); + strcpy(str, _str); add_assoc_string(return_value, table, str, 1); } #endif -- Alexey Zakhlestin http://www.milkfarmsoft.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/date php_date.c /ext/libxml libxml.c /ext/soap soap.c /ext/standard string.c var_unserializer.c var_unserializer.re ZendEngine2 zend_constants.c zend_hash.c zend_ob
On Thu, 26 Mar 2009, Felipe Pena wrote: felipeThu Mar 26 22:16:48 2009 UTC Modified files: /ZendEngine2 zend_constants.c zend_hash.c zend_object_handlers.c zend_operators.c /php-src/ext/date php_date.c Please, keep all the branches in sync, and also merge that change to PHP 5.2 and PHP 5.3 if needed. regards, Derick -- http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org twitter: derickrethans -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/date php_date.c /ext/libxml libxml.c /ext/soap soap.c /ext/standard string.c var_unserializer.c var_unserializer.re ZendEngine2 zend_constants.c zend_hash.c zend_ob
Please, keep all the branches in sync, and also merge that change to PHP 5.2 and PHP 5.3 if needed. I don't see what to sync, almost all the variables removed are related to the dropped UG() stuff. The change in php_date.c was just for sync with 5.3, non related to UG()... -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/libgd gd_png.c
tabeWed Apr 1 16:05:17 2009 UTC Modified files: /php-src/ext/gd/libgd gd_png.c Log: replaced static gdPngJmpbufStruct, which is afraid of being shared with several threads, by a couple of auto variables. http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_png.c?r1=1.28r2=1.29diff_format=u Index: php-src/ext/gd/libgd/gd_png.c diff -u php-src/ext/gd/libgd/gd_png.c:1.28 php-src/ext/gd/libgd/gd_png.c:1.29 --- php-src/ext/gd/libgd/gd_png.c:1.28 Sat Mar 14 16:06:57 2009 +++ php-src/ext/gd/libgd/gd_png.c Wed Apr 1 16:05:17 2009 @@ -41,14 +41,12 @@ return PNG_LIBPNG_VER_STRING; } -#ifndef PNG_SETJMP_NOT_SUPPORTED +#ifdef PNG_SETJMP_SUPPORTED typedef struct _jmpbuf_wrapper { jmp_buf jmpbuf; } jmpbuf_wrapper; -static jmpbuf_wrapper gdPngJmpbufStruct; - static void gdPngErrorHandler (png_structp png_ptr, png_const_charp msg) { jmpbuf_wrapper *jmpbuf_ptr; @@ -117,6 +115,9 @@ gdImagePtr gdImageCreateFromPngCtx (gdIOCtx * infile) { png_byte sig[8]; +#ifdef PNG_SETJMP_SUPPORTED + jmpbuf_wrapper jbw; +#endif png_structp png_ptr; png_infop info_ptr; png_uint_32 width, height, rowbytes, w, h; @@ -148,8 +149,8 @@ return NULL; } -#ifndef PNG_SETJMP_NOT_SUPPORTED - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, gdPngJmpbufStruct, gdPngErrorHandler, NULL); +#ifdef PNG_SETJMP_SUPPORTED + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, jbw, gdPngErrorHandler, NULL); #else png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); #endif @@ -174,8 +175,8 @@ /* setjmp() must be called in every non-callback function that calls a * PNG-reading libpng function */ -#ifndef PNG_SETJMP_NOT_SUPPORTED - if (setjmp(gdPngJmpbufStruct.jmpbuf)) { +#ifdef PNG_SETJMP_SUPPORTED + if (setjmp(jbw.jmpbuf)) { php_gd_error(gd-png error: setjmp returns error condition); png_destroy_read_struct(png_ptr, info_ptr, NULL); @@ -198,8 +199,6 @@ if (im == NULL) { php_gd_error(gd-png error: cannot allocate gdImage struct); png_destroy_read_struct(png_ptr, info_ptr, NULL); - gdFree(image_data); - gdFree(row_pointers); return NULL; } @@ -213,8 +212,8 @@ /* setjmp() must be called in every non-callback function that calls a * PNG-reading libpng function */ -#ifndef PNG_SETJMP_NOT_SUPPORTED - if (setjmp(gdPngJmpbufStruct.jmpbuf)) { +#ifdef PNG_SETJMP_SUPPORTED + if (setjmp(jbw.jmpbuf)) { php_gd_error(gd-png error: setjmp returns error condition); png_destroy_read_struct(png_ptr, info_ptr, NULL); gdFree(image_data); @@ -476,9 +475,10 @@ png_infop info_ptr; volatile int transparent = im-transparent; volatile int remap = FALSE; +#ifdef PNG_SETJMP_SUPPORTED + jmpbuf_wrapper jbw; -#ifndef PNG_SETJMP_NOT_SUPPORTED - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, gdPngJmpbufStruct, gdPngErrorHandler, NULL); + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, jbw, gdPngErrorHandler, NULL); #else png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); #endif @@ -495,8 +495,8 @@ return; } -#ifndef PNG_SETJMP_NOT_SUPPORTED - if (setjmp (gdPngJmpbufStruct.jmpbuf)) { +#ifdef PNG_SETJMP_SUPPORTED + if (setjmp(jbw.jmpbuf)) { php_gd_error(gd-png error: setjmp returns error condition); png_destroy_write_struct (png_ptr, info_ptr); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/gd/libgd gd_png.c
tabeWed Apr 1 16:06:56 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/gd/libgd gd_png.c Log: MFH: replaced static gdPngJmpbufStruct, which is afraid of being shared with several threads, by a couple of auto variables. http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_png.c?r1=1.17.4.2.2.5.2.4r2=1.17.4.2.2.5.2.5diff_format=u Index: php-src/ext/gd/libgd/gd_png.c diff -u php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.5.2.4 php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.5.2.5 --- php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.5.2.4 Sat Mar 14 16:08:00 2009 +++ php-src/ext/gd/libgd/gd_png.c Wed Apr 1 16:06:56 2009 @@ -41,14 +41,12 @@ return PNG_LIBPNG_VER_STRING; } -#ifndef PNG_SETJMP_NOT_SUPPORTED +#ifdef PNG_SETJMP_SUPPORTED typedef struct _jmpbuf_wrapper { jmp_buf jmpbuf; } jmpbuf_wrapper; -static jmpbuf_wrapper gdPngJmpbufStruct; - static void gdPngErrorHandler (png_structp png_ptr, png_const_charp msg) { jmpbuf_wrapper *jmpbuf_ptr; @@ -117,6 +115,9 @@ gdImagePtr gdImageCreateFromPngCtx (gdIOCtx * infile) { png_byte sig[8]; +#ifdef PNG_SETJMP_SUPPORTED + jmpbuf_wrapper jbw; +#endif png_structp png_ptr; png_infop info_ptr; png_uint_32 width, height, rowbytes, w, h; @@ -148,8 +149,8 @@ return NULL; } -#ifndef PNG_SETJMP_NOT_SUPPORTED - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, gdPngJmpbufStruct, gdPngErrorHandler, NULL); +#ifdef PNG_SETJMP_SUPPORTED + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, jbw, gdPngErrorHandler, NULL); #else png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); #endif @@ -174,8 +175,8 @@ /* setjmp() must be called in every non-callback function that calls a * PNG-reading libpng function */ -#ifndef PNG_SETJMP_NOT_SUPPORTED - if (setjmp(gdPngJmpbufStruct.jmpbuf)) { +#ifdef PNG_SETJMP_SUPPORTED + if (setjmp(jbw.jmpbuf)) { php_gd_error(gd-png error: setjmp returns error condition); png_destroy_read_struct(png_ptr, info_ptr, NULL); @@ -198,8 +199,6 @@ if (im == NULL) { php_gd_error(gd-png error: cannot allocate gdImage struct); png_destroy_read_struct(png_ptr, info_ptr, NULL); - gdFree(image_data); - gdFree(row_pointers); return NULL; } @@ -213,8 +212,8 @@ /* setjmp() must be called in every non-callback function that calls a * PNG-reading libpng function */ -#ifndef PNG_SETJMP_NOT_SUPPORTED - if (setjmp(gdPngJmpbufStruct.jmpbuf)) { +#ifdef PNG_SETJMP_SUPPORTED + if (setjmp(jbw.jmpbuf)) { php_gd_error(gd-png error: setjmp returns error condition); png_destroy_read_struct(png_ptr, info_ptr, NULL); gdFree(image_data); @@ -475,9 +474,10 @@ png_infop info_ptr; volatile int transparent = im-transparent; volatile int remap = FALSE; +#ifdef PNG_SETJMP_SUPPORTED + jmpbuf_wrapper jbw; -#ifndef PNG_SETJMP_NOT_SUPPORTED - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, gdPngJmpbufStruct, gdPngErrorHandler, NULL); + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, jbw, gdPngErrorHandler, NULL); #else png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); #endif @@ -494,8 +494,8 @@ return; } -#ifndef PNG_SETJMP_NOT_SUPPORTED - if (setjmp (gdPngJmpbufStruct.jmpbuf)) { +#ifdef PNG_SETJMP_SUPPORTED + if (setjmp(jbw.jmpbuf)) { php_gd_error(gd-png error: setjmp returns error condition); png_destroy_write_struct (png_ptr, info_ptr); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo_pgsql pgsql_driver.c
pajoye Wed Apr 1 16:13:33 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pdo_pgsql pgsql_driver.c Log: - fix build when pqprepare does not exist http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.53.2.14.2.9.2.5r2=1.53.2.14.2.9.2.6diff_format=u Index: php-src/ext/pdo_pgsql/pgsql_driver.c diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.9.2.5 php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.9.2.6 --- php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.9.2.5 Sat Mar 28 02:58:04 2009 +++ php-src/ext/pdo_pgsql/pgsql_driver.cWed Apr 1 16:13:33 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: pgsql_driver.c,v 1.53.2.14.2.9.2.5 2009/03/28 02:58:04 mbeccati Exp $ */ +/* $Id: pgsql_driver.c,v 1.53.2.14.2.9.2.6 2009/04/01 16:13:33 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -233,7 +233,9 @@ efree(S-cursor_name); } spprintf(S-cursor_name, 0, pdo_pgsql_cursor_%08x, (unsigned int) stmt); +#if HAVE_PQPREPARE emulate = 1; +#endif } #if HAVE_PQPREPARE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo_pgsql pgsql_driver.c
pajoye Wed Apr 1 16:14:50 2009 UTC Modified files: /php-src/ext/pdo_pgsql pgsql_driver.c Log: - MFB: fix build when pqprepare does not exist http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.72r2=1.73diff_format=u Index: php-src/ext/pdo_pgsql/pgsql_driver.c diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.72 php-src/ext/pdo_pgsql/pgsql_driver.c:1.73 --- php-src/ext/pdo_pgsql/pgsql_driver.c:1.72 Sat Mar 28 03:01:38 2009 +++ php-src/ext/pdo_pgsql/pgsql_driver.cWed Apr 1 16:14:50 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: pgsql_driver.c,v 1.72 2009/03/28 03:01:38 mbeccati Exp $ */ +/* $Id: pgsql_driver.c,v 1.73 2009/04/01 16:14:50 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -233,7 +233,9 @@ efree(S-cursor_name); } spprintf(S-cursor_name, 0, pdo_pgsql_cursor_%08x, (unsigned int) stmt); +#if HAVE_PQPREPARE emulate = 1; +#endif } #if HAVE_PQPREPARE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo_pgsql config.w32
pajoye Wed Apr 1 16:16:20 2009 UTC Modified files: /php-src/ext/pdo_pgsql config.w32 Log: - 8.3.x supports pqprepare http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/config.w32?r1=1.9r2=1.10diff_format=u Index: php-src/ext/pdo_pgsql/config.w32 diff -u php-src/ext/pdo_pgsql/config.w32:1.9 php-src/ext/pdo_pgsql/config.w32:1.10 --- php-src/ext/pdo_pgsql/config.w32:1.9Sat Mar 28 02:34:02 2009 +++ php-src/ext/pdo_pgsql/config.w32Wed Apr 1 16:16:20 2009 @@ -1,4 +1,4 @@ -// $Id: config.w32,v 1.9 2009/03/28 02:34:02 mbeccati Exp $ +// $Id: config.w32,v 1.10 2009/04/01 16:16:20 pajoye Exp $ // vim:ft=javascript ARG_WITH(pdo-pgsql, PostgreSQL support for PDO, no); @@ -12,6 +12,7 @@ ADD_FLAG('CFLAGS_PDO_PGSQL', /D HAVE_PG_CONFIG_H); } + AC_DEFINE('HAVE_PQPREPARE', 1, 'Have PqPrepare'); AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library'); ADD_FLAG('CFLAGS_PDO_PGSQL', /D HAVE_PQPARAMETERSTATUS=1 /D HAVE_PQPROTOCOLVERSION=1 /D HAVE_PGTRANSACTIONSTATUS=1 /D HAVE_PQUNESCAPEBYTEA=1 /D HAVE_PQRESULTERRORFIELD=1 /D HAVE_PQESCAPE_CONN=1 /D HAVE_PQESCAPE_BYTEA_CONN=1); ADD_EXTENSION_DEP('pdo_pgsql', 'pdo'); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard php_string.h string.c /ext/standard/tests/strings bug47546.phpt
mattwil Wed Apr 1 17:05:37 2009 UTC Removed files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings bug47546.phpt Modified files: /php-srcNEWS /php-src/ext/standard php_string.h string.c Log: MFH: explode() stuff: - Fixed bug #47560 (explode()'s limit parameter odd behaviour) by reverting change for bug #47546 - Changed int to long where needed (should fix memory errors from overflow seen in bug #47854) - Simplified logic a bit with limit and its default value - php_explode_negative_limit(): removed safe_emalloc (not needed; plain erealloc is used later) - Moved declarations/allocation to optimize if the delimiter isn't found - Changed ALLOC_STEP size for less realloc's (and maybe better memory block alignment?) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.548r2=1.2027.2.547.2.965.2.549diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.548 php-src/NEWS:1.2027.2.547.2.965.2.549 --- php-src/NEWS:1.2027.2.547.2.965.2.548 Wed Apr 1 14:00:35 2009 +++ php-src/NEWSWed Apr 1 17:05:34 2009 @@ -18,6 +18,7 @@ crashes). (Dmitry) - Fixed bug #47699 (autoload and late static binding). (Dmitry) - Fixed bug #47596 (Bus error on parsing file). (Dmitry) +- Fixed bug #47560 (explode()'s limit parameter odd behaviour). (Matt) - Fixed bug #47516 (nowdoc can not be embed in heredoc but can be embed in double quote). (Dmitry) - Fixed bug #47038 (Memory leak in include). (Dmitry) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_string.h?r1=1.87.2.2.2.3.2.4r2=1.87.2.2.2.3.2.5diff_format=u Index: php-src/ext/standard/php_string.h diff -u php-src/ext/standard/php_string.h:1.87.2.2.2.3.2.4 php-src/ext/standard/php_string.h:1.87.2.2.2.3.2.5 --- php-src/ext/standard/php_string.h:1.87.2.2.2.3.2.4 Wed Dec 31 11:15:45 2008 +++ php-src/ext/standard/php_string.h Wed Apr 1 17:05:35 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.87.2.2.2.3.2.4 2008/12/31 11:15:45 sebastian Exp $ */ +/* $Id: php_string.h,v 1.87.2.2.2.3.2.5 2009/04/01 17:05:35 mattwil Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -138,7 +138,7 @@ PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_len, zval *result, int case_sensitivity, int *replace_count); PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, zval *result); PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value TSRMLS_DC); -PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit); +PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, long limit); PHPAPI size_t php_strspn(char *s1, char *s2, char *s1_end, char *s2_end); PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.45r2=1.445.2.14.2.69.2.46diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.45 php-src/ext/standard/string.c:1.445.2.14.2.69.2.46 --- php-src/ext/standard/string.c:1.445.2.14.2.69.2.45 Wed Apr 1 14:00:38 2009 +++ php-src/ext/standard/string.c Wed Apr 1 17:05:35 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.445.2.14.2.69.2.45 2009/04/01 14:00:38 iliaa Exp $ */ +/* $Id: string.c,v 1.445.2.14.2.69.2.46 2009/04/01 17:05:35 mattwil Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -928,7 +928,7 @@ /* {{{ php_explode */ -PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit) +PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, long limit) { char *p1, *p2, *endp; @@ -944,7 +944,7 @@ add_next_index_stringl(return_value, p1, p2 - p1, 1); p1 = p2 + Z_STRLEN_P(delim); } while ((p2 = php_memnstr(p1, Z_STRVAL_P(delim), Z_STRLEN_P(delim), endp)) != NULL -(limit == -1 || --limit 1)); +--limit 1); if (p1 = endp) add_next_index_stringl(return_value, p1, endp-p1, 1); @@ -954,12 +954,10 @@ /* {{{ php_explode_negative_limit */ -PHPAPI void php_explode_negative_limit(zval *delim, zval *str, zval *return_value, int limit) +PHPAPI void php_explode_negative_limit(zval *delim, zval *str, zval *return_value, long limit) { -#define EXPLODE_ALLOC_STEP 50 +#define EXPLODE_ALLOC_STEP 64 char *p1, *p2, *endp; - int allocated = EXPLODE_ALLOC_STEP, found = 0, i = 0, to_return = 0; - char **positions = safe_emalloc(allocated, sizeof(char *), 0); endp = Z_STRVAL_P(str) + Z_STRLEN_P(str); @@ -972,6 +970,10 @@
[PHP-CVS] cvs: win-installer / GenPHPInstaller.wxs.php
jmertic Wed Apr 1 19:47:32 2009 UTC Modified files: /win-installer GenPHPInstaller.wxs.php Log: Fix check for correct php.ini to work for 5.2 and 5.3+ install builds. http://cvs.php.net/viewvc.cgi/win-installer/GenPHPInstaller.wxs.php?r1=1.12r2=1.13diff_format=u Index: win-installer/GenPHPInstaller.wxs.php diff -u win-installer/GenPHPInstaller.wxs.php:1.12 win-installer/GenPHPInstaller.wxs.php:1.13 --- win-installer/GenPHPInstaller.wxs.php:1.12 Tue Mar 24 22:13:00 2009 +++ win-installer/GenPHPInstaller.wxs.php Wed Apr 1 19:47:32 2009 @@ -44,7 +44,10 @@ $PHPInstallerBaseWXS-save(PHPInstaller$version.wxs); // remove extension info from php.ini-production -$infile = fopen(Files/php.ini-production,'r'); +if ( is_file(Files/php.ini-production) ) + $infile = fopen(Files/php.ini-production,'r'); +else + $infile = fopen(Files/php.ini-recommended,'r'); $outfile = fopen(Files/php.ini,'w'); if (!$outfile || !$infile) { echo Cannot open php.ini or php.ini-production\n; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard scanf.c
kalle Thu Apr 2 05:16:55 2009 UTC Modified files: /php-src/ext/standard scanf.c Log: We dont need to escape % here, it just generates a compiler warning http://cvs.php.net/viewvc.cgi/php-src/ext/standard/scanf.c?r1=1.47r2=1.48diff_format=u Index: php-src/ext/standard/scanf.c diff -u php-src/ext/standard/scanf.c:1.47 php-src/ext/standard/scanf.c:1.48 --- php-src/ext/standard/scanf.c:1.47 Tue Mar 10 23:39:40 2009 +++ php-src/ext/standard/scanf.cThu Apr 2 05:16:55 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: scanf.c,v 1.47 2009/03/10 23:39:40 helly Exp $ */ +/* $Id: scanf.c,v 1.48 2009/04/02 05:16:55 kalle Exp $ */ /* scanf.c -- @@ -574,7 +574,7 @@ gotSequential = 1; if (gotXpg) { mixedXPG: - php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, cannot mix \\%\ and \\%n$\ conversion specifiers); + php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, cannot mix \%\ and \%n$\ conversion specifiers); goto error; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard scanf.c
kalle Thu Apr 2 05:17:36 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard scanf.c Log: MFH: We dont need to escape % here, it just generates a compiler warning http://cvs.php.net/viewvc.cgi/php-src/ext/standard/scanf.c?r1=1.31.2.2.2.5.2.5r2=1.31.2.2.2.5.2.6diff_format=u Index: php-src/ext/standard/scanf.c diff -u php-src/ext/standard/scanf.c:1.31.2.2.2.5.2.5 php-src/ext/standard/scanf.c:1.31.2.2.2.5.2.6 --- php-src/ext/standard/scanf.c:1.31.2.2.2.5.2.5 Fri Feb 6 10:20:09 2009 +++ php-src/ext/standard/scanf.cThu Apr 2 05:17:36 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: scanf.c,v 1.31.2.2.2.5.2.5 2009/02/06 10:20:09 felipe Exp $ */ +/* $Id: scanf.c,v 1.31.2.2.2.5.2.6 2009/04/02 05:17:36 kalle Exp $ */ /* scanf.c -- @@ -394,7 +394,7 @@ gotSequential = 1; if (gotXpg) { mixedXPG: - php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, cannot mix \\%\ and \\%n$\ conversion specifiers); + php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, cannot mix \%\ and \%n$\ conversion specifiers); goto error; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php