diff options
| author | Felipe Pena <felipe@php.net> | 2009-03-30 19:43:47 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2009-03-30 19:43:47 +0000 |
| commit | cf5e94b01077b75507d55d320afc28689c676c54 (patch) | |
| tree | 05d5e9c5a9fe88de170db00a13f08505563b5ca9 /ext/mysqlnd/mysqlnd_statistics.c | |
| parent | 714b0cdef93ce917f9bf84d7506566a434aa86c6 (diff) | |
| download | php-git-cf5e94b01077b75507d55d320afc28689c676c54.tar.gz | |
- Sync with 5.3
Diffstat (limited to 'ext/mysqlnd/mysqlnd_statistics.c')
| -rw-r--r-- | ext/mysqlnd/mysqlnd_statistics.c | 21 |
1 files changed, 10 insertions, 11 deletions
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); |
