From: Felipe Pena Date: Mon, 30 Mar 2009 19:43:47 +0000 (+0000) Subject: - Sync with 5.3 X-Git-Tag: php-5.4.0alpha1~191^2~4014 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf5e94b01077b75507d55d320afc28689c676c54;p=php - Sync with 5.3 --- diff --git a/ext/mysqlnd/mysqlnd_result_meta.c b/ext/mysqlnd/mysqlnd_result_meta.c index fcb6975ff5..0644b0f09c 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.c +++ b/ext/mysqlnd/mysqlnd_result_meta.c @@ -143,8 +143,10 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met { 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"); diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c index 0807b3d017..4e6089b915 100644 --- a/ext/mysqlnd/mysqlnd_statistics.c +++ b/ext/mysqlnd/mysqlnd_statistics.c @@ -164,21 +164,20 @@ mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, zval *return_value TS 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);