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 | 92ef63a07b04bb85d6587b2905d068ce8a781061 (patch) | |
tree | 4ce90d8821ccc1673b4d42539285049f93c46bc3 /ext/mysqlnd/mysqlnd_wireprotocol.c | |
parent | 8bf7114691540f29e6a07a34231fdf536652c1b8 (diff) | |
download | php-git-92ef63a07b04bb85d6587b2905d068ce8a781061.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 ba31984d80..eb2ce4b459 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); } |