diff options
author | Andrey Hristov <andrey@php.net> | 2010-08-12 12:02:02 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-08-12 12:02:02 +0000 |
commit | c974313aed296dfab6cd7e1859ecf48a5fd581a8 (patch) | |
tree | 37439d75953d95f564a44e8a30874afa317dd009 /ext/mysqlnd/mysqlnd_wireprotocol.c | |
parent | d27983e7813cf32d187f9ce9bb652a670751212e (diff) | |
download | php-git-c974313aed296dfab6cd7e1859ecf48a5fd581a8.tar.gz |
Switch from using PHP_MAJOR_VERSION to separate define for
unicode. Unicode is no more, but these are "bookmarks" where
to change mysqlnd, if Unicode becomes trendy again.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_wireprotocol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index b434dd942f..96d6af26cf 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -1332,7 +1332,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ZVAL_NULL(*current_field); last_field_was_string = FALSE; } else { -#if PHP_MAJOR_VERSION >= 6 || defined(MYSQLND_STRING_TO_INT_CONVERSION) +#if MYSQLND_UNICODE || defined(MYSQLND_STRING_TO_INT_CONVERSION) struct st_mysqlnd_perm_bind perm_bind = mysqlnd_ps_fetch_functions[fields_metadata[i].type]; #endif @@ -1437,7 +1437,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval p -= len; if (Z_TYPE_PP(current_field) == IS_LONG) { bit_area += 1 + sprintf((char *)start, "%ld", Z_LVAL_PP(current_field)); -#if PHP_MAJOR_VERSION >= 6 +#if MYSQLND_UNICODE if (as_unicode) { ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0); } else @@ -1450,7 +1450,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval bit_area += Z_STRLEN_PP(current_field); *bit_area++ = '\0'; zval_dtor(*current_field); -#if PHP_MAJOR_VERSION >= 6 +#if MYSQLND_UNICODE if (as_unicode) { ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0); } else @@ -1464,7 +1464,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval the buffers are not referenced - everything is copied. */ } else -#if PHP_MAJOR_VERSION < 6 +#if MYSQLND_UNICODE == 0 { ZVAL_STRINGL(*current_field, (char *)p, len, 0); } |