felipe Mon Mar 30 19:43:47 2009 UTC Modified files: /php-src/ext/mysqlnd mysqlnd_result_meta.c mysqlnd_statistics.c Log: - Sync with 5.3 http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result_meta.c?r1=1.11&r2=1.12&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_result_meta.c diff -u php-src/ext/mysqlnd/mysqlnd_result_meta.c:1.11 php-src/ext/mysqlnd/mysqlnd_result_meta.c:1.12 --- php-src/ext/mysqlnd/mysqlnd_result_meta.c:1.11 Fri Mar 27 19:28:26 2009 +++ php-src/ext/mysqlnd/mysqlnd_result_meta.c Mon Mar 30 19:43:47 2009 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result_meta.c,v 1.11 2009/03/27 19:28:26 felipe Exp $ */ +/* $Id: mysqlnd_result_meta.c,v 1.12 2009/03/30 19:43:47 felipe Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" @@ -143,8 +143,10 @@ { unsigned int i = 0; php_mysql_packet_res_field field_packet; +#if PHP_MAJOR_VERSION >= 6 UChar *ustr; int ulen; +#endif DBG_ENTER("mysqlnd_res_meta::read_metadata"); http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_statistics.c?r1=1.11&r2=1.12&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_statistics.c diff -u php-src/ext/mysqlnd/mysqlnd_statistics.c:1.11 php-src/ext/mysqlnd/mysqlnd_statistics.c:1.12 --- php-src/ext/mysqlnd/mysqlnd_statistics.c:1.11 Fri Mar 27 19:28:26 2009 +++ php-src/ext/mysqlnd/mysqlnd_statistics.c Mon Mar 30 19:43:47 2009 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_statistics.c,v 1.11 2009/03/27 19:28:26 felipe Exp $ */ +/* $Id: mysqlnd_statistics.c,v 1.12 2009/03/30 19:43:47 felipe Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" @@ -164,21 +164,20 @@ mysqlnd_array_init(return_value, STAT_LAST); for (i = 0; i < STAT_LAST; i++) { +#if PHP_MAJOR_VERSION >= 6 + UChar *ustr, *tstr; + int ulen, tlen; +#endif char tmp[22]; sprintf((char *)&tmp, MYSQLND_LLU_SPEC, stats->values[i]); #if PHP_MAJOR_VERSION >= 6 - { - UChar *ustr, *tstr; - int ulen, tlen; - - zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, mysqlnd_stats_values_names[i].s, - mysqlnd_stats_values_names[i].l + 1 TSRMLS_CC); - zend_string_to_unicode(UG(utf8_conv), &tstr, &tlen, tmp, strlen(tmp) + 1 TSRMLS_CC); - add_u_assoc_unicode_ex(return_value, IS_UNICODE, ZSTR(ustr), ulen, tstr, 1); - efree(ustr); - efree(tstr); - } + zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, mysqlnd_stats_values_names[i].s, + mysqlnd_stats_values_names[i].l + 1 TSRMLS_CC); + zend_string_to_unicode(UG(utf8_conv), &tstr, &tlen, tmp, strlen(tmp) + 1 TSRMLS_CC); + add_u_assoc_unicode_ex(return_value, IS_UNICODE, ZSTR(ustr), ulen, tstr, 1); + efree(ustr); + efree(tstr); #else add_assoc_string_ex(return_value, mysqlnd_stats_values_names[i].s, mysqlnd_stats_values_names[i].l + 1, tmp, 1);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php