[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/posix/posix.c trunk/ext/posix/posix.c
mike Tue, 18 May 2010 07:25:29 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299437 Log: * fixed bug #49819: STDOUT losing data with posix_isatty() Bug: http://bugs.php.net/49819 (Open) STDOUT losing data with posix_isatty() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/posix/posix.c U php/php-src/trunk/ext/posix/posix.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-05-18 01:43:37 UTC (rev 299436) +++ php/php-src/branches/PHP_5_3/NEWS 2010-05-18 07:25:29 UTC (rev 299437) @@ -148,6 +148,7 @@ - Fixed bug #50358 (Compile failure compiling ext/phar/util.lo). (Felipe) - Fixed bug #49893 (Crash while creating an instance of Zend_Mail_Storage_Pop3). (Dmitry) +- Fixed bug #49819 (STDOUT losing data with posix_isatty()). (Mike) - Fixed bug #49778 (DateInterval::format(%a) is always zero when an interval is created from an ISO string). (Derick) - Fixed bug #49700 (memory leaks in php_date.c if garbage collector is Modified: php/php-src/branches/PHP_5_3/ext/posix/posix.c === --- php/php-src/branches/PHP_5_3/ext/posix/posix.c 2010-05-18 01:43:37 UTC (rev 299436) +++ php/php-src/branches/PHP_5_3/ext/posix/posix.c 2010-05-18 07:25:29 UTC (rev 299437) @@ -703,7 +703,9 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, expects argument 1 to be a valid stream resource); return 0; } - if (php_stream_can_cast(stream, PHP_STREAM_AS_FD) == SUCCESS) { + if (php_stream_can_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT) == SUCCESS) { + php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT, (void*)fd, 0); + } else if (php_stream_can_cast(stream, PHP_STREAM_AS_FD) == SUCCESS) { php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)fd, 0); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, could not use stream of type '%s', Modified: php/php-src/trunk/ext/posix/posix.c === --- php/php-src/trunk/ext/posix/posix.c 2010-05-18 01:43:37 UTC (rev 299436) +++ php/php-src/trunk/ext/posix/posix.c 2010-05-18 07:25:29 UTC (rev 299437) @@ -703,7 +703,9 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, expects argument 1 to be a valid stream resource); return 0; } - if (php_stream_can_cast(stream, PHP_STREAM_AS_FD) == SUCCESS) { + if (php_stream_can_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT) == SUCCESS) { + php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT, (void*)fd, 0); + } else if (php_stream_can_cast(stream, PHP_STREAM_AS_FD) == SUCCESS) { php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)fd, 0); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, could not use stream of type '%s', -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
mike Tue, 18 May 2010 07:49:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299439 Log: add missing news about backlog socket context option for stream_socket_server() Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-05-18 07:41:10 UTC (rev 299438) +++ php/php-src/branches/PHP_5_3/NEWS 2010-05-18 07:49:15 UTC (rev 299439) @@ -9,6 +9,7 @@ - Added stream filter support to mcrypt extension (ported from mcrypt_filter). (Stas) - Added full_special_chars filter to ext/filter (Rasmus) +- Added backlock socket context option for stream_socket_server(). (Mike) - Changed namespaced classes so that the ctor can only be named __construct now. (Stas) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
mike Tue, 18 May 2010 08:02:10 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299440 Log: fix typo Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-05-18 07:49:15 UTC (rev 299439) +++ php/php-src/branches/PHP_5_3/NEWS 2010-05-18 08:02:10 UTC (rev 299440) @@ -9,7 +9,7 @@ - Added stream filter support to mcrypt extension (ported from mcrypt_filter). (Stas) - Added full_special_chars filter to ext/filter (Rasmus) -- Added backlock socket context option for stream_socket_server(). (Mike) +- Added backlog socket context option for stream_socket_server(). (Mike) - Changed namespaced classes so that the ctor can only be named __construct now. (Stas) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
On Tue, May 18, 2010 at 09:49, Michael Wallner m...@php.net wrote: mike Tue, 18 May 2010 07:49:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299439 Log: add missing news about backlog socket context option for stream_socket_server() Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-05-18 07:41:10 UTC (rev 299438) +++ php/php-src/branches/PHP_5_3/NEWS 2010-05-18 07:49:15 UTC (rev 299439) @@ -9,6 +9,7 @@ - Added stream filter support to mcrypt extension (ported from mcrypt_filter). (Stas) - Added full_special_chars filter to ext/filter (Rasmus) +- Added backlock socket context option for stream_socket_server(). (Mike) Where is that commit? Most context options are quite well documented, so I'd appreciate more info about this. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqli/ config.m4 config.w32 mysqli.c mysqli_libmysql.h mysqli_result_iterator.c php_mysqli_structs.h tests/mysqli_query_iterators.phpt
andrey Tue, 18 May 2010 10:39:26 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299444 Log: Add iterator to mysqli_result. Works both for : - USE_RESULT, can be iterated only once, kind of forward iterator - STORE_RESULT, can be iterated multiple times Changed paths: U php/php-src/trunk/ext/mysqli/config.m4 U php/php-src/trunk/ext/mysqli/config.w32 U php/php-src/trunk/ext/mysqli/mysqli.c U php/php-src/trunk/ext/mysqli/mysqli_libmysql.h A php/php-src/trunk/ext/mysqli/mysqli_result_iterator.c U php/php-src/trunk/ext/mysqli/php_mysqli_structs.h A php/php-src/trunk/ext/mysqli/tests/mysqli_query_iterators.phpt Modified: php/php-src/trunk/ext/mysqli/config.m4 === --- php/php-src/trunk/ext/mysqli/config.m4 2010-05-18 09:09:18 UTC (rev 299443) +++ php/php-src/trunk/ext/mysqli/config.m4 2010-05-18 10:39:26 UTC (rev 299444) @@ -77,7 +77,7 @@ if test $PHP_MYSQLI != no; then mysqli_sources=mysqli.c mysqli_api.c mysqli_prop.c mysqli_nonapi.c \ mysqli_fe.c mysqli_report.c mysqli_driver.c mysqli_warning.c \ - mysqli_exception.c $mysqli_extra_sources + mysqli_exception.c mysqli_result_iterator.c $mysqli_extra_sources PHP_NEW_EXTENSION(mysqli, $mysqli_sources, $ext_shared) PHP_SUBST(MYSQLI_SHARED_LIBADD) Modified: php/php-src/trunk/ext/mysqli/config.w32 === --- php/php-src/trunk/ext/mysqli/config.w32 2010-05-18 09:09:18 UTC (rev 299443) +++ php/php-src/trunk/ext/mysqli/config.w32 2010-05-18 10:39:26 UTC (rev 299444) @@ -18,6 +18,7 @@ mysqli_fe.c + mysqli_nonapi.c + mysqli_prop.c + + mysqli_result_iterator.c + mysqli_report.c + mysqli_warning.c; Modified: php/php-src/trunk/ext/mysqli/mysqli.c === --- php/php-src/trunk/ext/mysqli/mysqli.c 2010-05-18 09:09:18 UTC (rev 299443) +++ php/php-src/trunk/ext/mysqli/mysqli.c 2010-05-18 10:39:26 UTC (rev 299444) @@ -32,6 +32,7 @@ #include ext/standard/php_string.h #include php_mysqli_structs.h #include zend_exceptions.h +#include zend_interfaces.h ZEND_DECLARE_MODULE_GLOBALS(mysqli) static PHP_GINIT_FUNCTION(mysqli); @@ -685,6 +686,9 @@ zend_hash_init(mysqli_result_properties, 0, NULL, NULL, 1); MYSQLI_ADD_PROPERTIES(mysqli_result_properties, mysqli_result_property_entries); MYSQLI_ADD_PROPERTIES_INFO(ce, mysqli_result_property_info_entries); + mysqli_result_class_entry-get_iterator = php_mysqli_result_get_iterator; + mysqli_result_class_entry-iterator_funcs.funcs = php_mysqli_result_iterator_funcs; + zend_class_implements(mysqli_result_class_entry TSRMLS_CC, 1, zend_ce_traversable); zend_hash_add(classes, ce-name, ce-name_length+1, mysqli_result_properties, sizeof(mysqli_result_properties), NULL); REGISTER_MYSQLI_CLASS_ENTRY(mysqli_stmt, mysqli_stmt_class_entry, mysqli_stmt_methods); @@ -1072,59 +1076,16 @@ } /* }}} */ -/* {{{ php_mysqli_fetch_into_hash + +/* {{{ php_mysqli_fetch_into_hash_aux */ -void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags, int into_object) +void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, long fetchtype TSRMLS_DC) { - MYSQL_RES *result; - zval *mysql_result; - long fetchtype; - zval *ctor_params = NULL; - zend_class_entry *ce = NULL; -#if !defined(MYSQLI_USE_MYSQLND) + MYSQL_ROW row; unsigned int i; MYSQL_FIELD *fields; - MYSQL_ROW row; unsigned long *field_len; -#endif - if (into_object) { - char *class_name; - int class_name_len; - - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O|sz, mysql_result, mysqli_result_class_entry, class_name, class_name_len, ctor_params) == FAILURE) { - return; - } - if (ZEND_NUM_ARGS() (getThis() ? 1 : 2)) { - ce = zend_standard_class_def; - } else { - ce = zend_fetch_class(class_name, class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC); - } - if (!ce) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not find class '%s', class_name); - return; - } - fetchtype = MYSQLI_ASSOC; - } else { - if (override_flags) { - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O, mysql_result, mysqli_result_class_entry) == FAILURE) { -return; - } - fetchtype = override_flags; - } else { - fetchtype = MYSQLI_BOTH; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O|l, mysql_result, mysqli_result_class_entry, fetchtype) == FAILURE) { -return; - } - } - } - MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, mysqli_result, MYSQLI_STATUS_VALID); - - if (fetchtype MYSQLI_ASSOC || fetchtype MYSQLI_BOTH) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH); - RETURN_FALSE; - } - #if
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqli/tests/ mysqli_class_mysqli_result_reflection.phpt
andrey Tue, 18 May 2010 11:36:54 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299447 Log: Update test file Changed paths: U php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt 2010-05-18 11:08:04 UTC (rev 299446) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt 2010-05-18 11:36:54 UTC (rev 299447) @@ -35,7 +35,7 @@ isInterface: no isAbstract: no isFinal: no -isIteratable: no +isIteratable: yes Modifiers: '0' Parent Class: '' Extension: 'mysqli' -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysql/php_mysql.c branches/PHP_5_3/ext/mysqli/mysqli.c branches/PHP_5_3/ext/mysqli/mysqli_api.c branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c trunk/ext/
andrey Tue, 18 May 2010 11:50:31 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299448 Log: Remove duplicated code. Use one centralized functions for data extraction. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c U php/php-src/trunk/ext/mysql/php_mysql.c U php/php-src/trunk/ext/mysqli/mysqli_api.c U php/php-src/trunk/ext/mysqli/mysqli_nonapi.c Modified: php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c === --- php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c 2010-05-18 11:36:54 UTC (rev 299447) +++ php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c 2010-05-18 11:50:31 UTC (rev 299448) @@ -1993,7 +1993,7 @@ } } #else - mysqlnd_fetch_into(mysql_result, MYSQLND_FETCH_ASSOC, return_value, MYSQLND_MYSQL); + mysqlnd_fetch_into(mysql_result, ((result_type MYSQL_NUM)? MYSQLND_FETCH_NUM:0) | ((result_type MYSQL_ASSOC)? MYSQLND_FETCH_ASSOC:0), return_value, MYSQLND_MYSQL); #endif #ifdef ZEND_ENGINE_2 @@ -2071,19 +2071,7 @@ Gets a result row as an enumerated array */ PHP_FUNCTION(mysql_fetch_row) { -#ifdef MYSQL_USE_MYSQLND - MYSQL_RES *result; - zval *mysql_result; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, mysql_result) == FAILURE) { - return; - } - ZEND_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, -1, MySQL result, le_result); - - mysqlnd_fetch_into(result, MYSQLND_FETCH_NUM, return_value, MYSQLND_MYSQL); -#else php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQL_NUM, 1, 0); -#endif } /* }}} */ @@ -2105,25 +2093,7 @@ Fetch a result row as an array (associative, numeric or both) */ PHP_FUNCTION(mysql_fetch_array) { -#ifndef MYSQL_USE_MYSQLND php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 2, 0); -#else - MYSQL_RES *result; - zval *mysql_result; - long mode = MYSQLND_FETCH_BOTH; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|l, mysql_result, mode) == FAILURE) { - return; - } - ZEND_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, -1, MySQL result, le_result); - - if (mode ~MYSQL_BOTH) { -php_error_docref(NULL TSRMLS_CC, E_WARNING, The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH); -mode = MYSQL_BOTH; -} - - mysqlnd_fetch_into(result, mode, return_value, MYSQLND_MYSQL); -#endif } /* }}} */ @@ -2132,19 +2102,7 @@ Fetch a result row as an associative array */ PHP_FUNCTION(mysql_fetch_assoc) { -#ifndef MYSQL_USE_MYSQLND php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQL_ASSOC, 1, 0); -#else - MYSQL_RES *result; - zval *mysql_result; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, mysql_result) == FAILURE) { - return; - } - ZEND_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, -1, MySQL result, le_result); - - mysqlnd_fetch_into(result, MYSQLND_FETCH_ASSOC, return_value, MYSQLND_MYSQL); -#endif } /* }}} */ Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c 2010-05-18 11:36:54 UTC (rev 299447) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c 2010-05-18 11:50:31 UTC (rev 299448) @@ -1195,7 +1195,7 @@ } } #else - mysqlnd_fetch_into(result, MYSQLND_FETCH_ASSOC, return_value, MYSQLND_MYSQLI); + mysqlnd_fetch_into(result, ((fetchtype MYSQLI_NUM)? MYSQLND_FETCH_NUM:0) | ((fetchtype MYSQLI_ASSOC)? MYSQLND_FETCH_ASSOC:0), return_value, MYSQLND_MYSQLI); #endif if (into_object Z_TYPE_P(return_value) != IS_NULL) { Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c 2010-05-18 11:36:54 UTC (rev 299447) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c 2010-05-18 11:50:31 UTC (rev 299448) @@ -1148,18 +1148,7 @@ Get a result row as an enumerated array */ PHP_FUNCTION(mysqli_fetch_row) { -#if !defined(MYSQLI_USE_MYSQLND) php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQLI_NUM, 0); -#else - MYSQL_RES *result; - zval *mysql_result; - - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O, mysql_result, mysqli_result_class_entry) == FAILURE) { - return; - } - MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, mysqli_result, MYSQLI_STATUS_VALID); - mysqlnd_fetch_into(result, MYSQLND_FETCH_NUM, return_value, MYSQLND_MYSQLI); -#endif } /* }}} */ Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-05-18 11:36:54 UTC (rev
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
andrey Tue, 18 May 2010 12:01:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299449 Log: NEWS entry Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-05-18 11:50:31 UTC (rev 299448) +++ php/php-src/trunk/NEWS 2010-05-18 12:01:15 UTC (rev 299449) @@ -34,6 +34,8 @@ - Added support for storing upload progress feedback in session data. (Arnaud) - Added support for CURLOPT_MAX_RECV_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE. FR #51815. (Pierrick) +- Added iterator support in MySQLi. mysqli_result implements Traversable. + (Andrey, Johannes) - default_charset if not specified is now UTF-8 instead of ISO-8859-1. (Rasmus) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/gd/ gd.c
pajoye Tue, 18 May 2010 12:38:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299451 Log: - #51793, Add alpha argument to imagecolorset Bug: http://bugs.php.net/51793 (Assigned) Add alpha argument to imagecolorset Changed paths: U php/php-src/trunk/ext/gd/gd.c Modified: php/php-src/trunk/ext/gd/gd.c === --- php/php-src/trunk/ext/gd/gd.c 2010-05-18 12:27:53 UTC (rev 299450) +++ php/php-src/trunk/ext/gd/gd.c 2010-05-18 12:38:57 UTC (rev 299451) @@ -498,12 +498,13 @@ ZEND_ARG_INFO(0, blue) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_imagecolorset, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecolorset, 0, 0, 5) ZEND_ARG_INFO(0, im) ZEND_ARG_INFO(0, color) ZEND_ARG_INFO(0, red) ZEND_ARG_INFO(0, green) ZEND_ARG_INFO(0, blue) + ZEND_ARG_INFO(0, alpha) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_imagecolorsforindex, 0) @@ -3058,11 +3059,11 @@ PHP_FUNCTION(imagecolorset) { zval *IM; - long color, red, green, blue; + long color, red, green, blue, alpha = 0; int col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, IM, color, red, green, blue) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|l, IM, color, red, green, blue, alpha) == FAILURE) { return; } @@ -3074,6 +3075,7 @@ im-red[col] = red; im-green[col] = green; im-blue[col] = blue; + im-alpha[col] = alpha; } else { RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqli/ mysqli_result_iterator.c
andrey Tue, 18 May 2010 15:02:50 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299455 Log: Fix comment Changed paths: U php/php-src/trunk/ext/mysqli/mysqli_result_iterator.c Modified: php/php-src/trunk/ext/mysqli/mysqli_result_iterator.c === --- php/php-src/trunk/ext/mysqli/mysqli_result_iterator.c 2010-05-18 14:33:02 UTC (rev 299454) +++ php/php-src/trunk/ext/mysqli/mysqli_result_iterator.c 2010-05-18 15:02:50 UTC (rev 299455) @@ -148,10 +148,7 @@ /* }}} */ -/* {{{ */ -/* PHP6 has the following declaration - static int php_mysqli_result_iterator_current_key(zend_object_iterator *iter, zstr *str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) -*/ +/* {{{ php_mysqli_result_iterator_current_key */ static int php_mysqli_result_iterator_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) { php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/mysql/ php_mysql.c
andrey Tue, 18 May 2010 16:35:17 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299457 Log: And I thought I fixed that... Part of the previous changeset - remove duplicated code/ The ifdefs were for debug purposes. Changed paths: U php/php-src/trunk/ext/mysql/php_mysql.c Modified: php/php-src/trunk/ext/mysql/php_mysql.c === --- php/php-src/trunk/ext/mysql/php_mysql.c 2010-05-18 15:18:32 UTC (rev 299456) +++ php/php-src/trunk/ext/mysql/php_mysql.c 2010-05-18 16:35:17 UTC (rev 299457) @@ -2071,19 +2071,7 @@ Gets a result row as an enumerated array */ PHP_FUNCTION(mysql_fetch_row) { -#if 1 - MYSQL_RES *result; - zval*mysql_result; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, mysql_result) == FAILURE) { - return; - } - ZEND_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, -1, MySQL result, le_result); - - mysqlnd_fetch_into(result, MYSQLND_FETCH_NUM, return_value, MYSQLND_MYSQL); -#else php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQL_NUM, 1, 0); -#endif } /* }}} */ @@ -2105,25 +2093,7 @@ Fetch a result row as an array (associative, numeric or both) */ PHP_FUNCTION(mysql_fetch_array) { -#if 1 php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 2, 0); -#else - MYSQL_RES *result; - zval*mysql_result; - longmode = MYSQLND_FETCH_BOTH; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|l, mysql_result, mode) == FAILURE) { - return; - } - ZEND_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, -1, MySQL result, le_result); - - if (mode ~MYSQL_BOTH) { -php_error_docref(NULL TSRMLS_CC, E_WARNING, The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH); -mode = MYSQL_BOTH; -} - - mysqlnd_fetch_into(result, mode, return_value, MYSQLND_MYSQL); -#endif } /* }}} */ @@ -2132,19 +2102,7 @@ Fetch a result row as an associative array */ PHP_FUNCTION(mysql_fetch_assoc) { -#if 1 php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQL_ASSOC, 1, 0); -#else - MYSQL_RES *result; - zval*mysql_result; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, mysql_result) == FAILURE) { - return; - } - ZEND_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, -1, MySQL result, le_result); - - mysqlnd_fetch_into(result, MYSQLND_FETCH_ASSOC, return_value, MYSQLND_MYSQL); -#endif } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/streams/streams.c trunk/main/streams/streams.c
pajoye Tue, 18 May 2010 19:39:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299466 Log: - #51854, fix logic (patch by Tjerk) Bug: http://bugs.php.net/51854 (Open) stream_set_read_buffer() not working as expected Changed paths: U php/php-src/branches/PHP_5_3/main/streams/streams.c U php/php-src/trunk/main/streams/streams.c Modified: php/php-src/branches/PHP_5_3/main/streams/streams.c === --- php/php-src/branches/PHP_5_3/main/streams/streams.c 2010-05-18 18:45:12 UTC (rev 299465) +++ php/php-src/branches/PHP_5_3/main/streams/streams.c 2010-05-18 19:39:39 UTC (rev 299466) @@ -1186,7 +1186,7 @@ /* try to match the buffer mode as best we can */ if (value == PHP_STREAM_BUFFER_NONE) { stream-flags |= PHP_STREAM_FLAG_NO_BUFFER; - } else { + } else if (stream-flags PHP_STREAM_FLAG_NO_BUFFER) { stream-flags ^= PHP_STREAM_FLAG_NO_BUFFER; } ret = PHP_STREAM_OPTION_RETURN_OK; Modified: php/php-src/trunk/main/streams/streams.c === --- php/php-src/trunk/main/streams/streams.c2010-05-18 18:45:12 UTC (rev 299465) +++ php/php-src/trunk/main/streams/streams.c2010-05-18 19:39:39 UTC (rev 299466) @@ -1186,7 +1186,7 @@ /* try to match the buffer mode as best we can */ if (value == PHP_STREAM_BUFFER_NONE) { stream-flags |= PHP_STREAM_FLAG_NO_BUFFER; - } else { + } else if (stream-flags PHP_STREAM_FLAG_NO_BUFFER) { stream-flags ^= PHP_STREAM_FLAG_NO_BUFFER; } ret = PHP_STREAM_OPTION_RETURN_OK; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php