diff options
author | Felipe Pena <felipe@php.net> | 2009-03-30 16:52:33 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2009-03-30 16:52:33 +0000 |
commit | dcd86aebd24acbcd24b0740238a1e93ab9ef9d4b (patch) | |
tree | bd736429240453a6fd9269756a3776c507d3a1c7 /ext/mysqlnd/mysqlnd_statistics.c | |
parent | 02fe66d1e04a0ef6abcd30033f95aac3c132c6be (diff) | |
download | php-git-dcd86aebd24acbcd24b0740238a1e93ab9ef9d4b.tar.gz |
- MFH: Removed UG(unicode) checks
Diffstat (limited to 'ext/mysqlnd/mysqlnd_statistics.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_statistics.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c index fd9c455aee..4e6089b915 100644 --- a/ext/mysqlnd/mysqlnd_statistics.c +++ b/ext/mysqlnd/mysqlnd_statistics.c @@ -164,26 +164,24 @@ 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 - if (UG(unicode)) { - 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); - } else -#endif - { - add_assoc_string_ex(return_value, mysqlnd_stats_values_names[i].s, - mysqlnd_stats_values_names[i].l + 1, tmp, 1); - } + 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); +#endif } } /* }}} */ |