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.
This commit is contained in:
Andrey Hristov 2010-08-12 12:02:02 +00:00
parent d27983e781
commit c974313aed
12 changed files with 46 additions and 40 deletions

View file

@ -481,7 +481,7 @@ mysqlnd_connect_run_authentication(
if (options->charset_name && (charset = mysqlnd_find_charset_name(options->charset_name))) { if (options->charset_name && (charset = mysqlnd_find_charset_name(options->charset_name))) {
auth_packet->charset_no = charset->nr; auth_packet->charset_no = charset->nr;
} else { } else {
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
auth_packet->charset_no = 200;/* utf8 - swedish collation, check mysqlnd_charset.c */ auth_packet->charset_no = 200;/* utf8 - swedish collation, check mysqlnd_charset.c */
#else #else
auth_packet->charset_no = greet_packet->charset_no; auth_packet->charset_no = greet_packet->charset_no;
@ -799,7 +799,7 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND * conn,
mysqlnd_local_infile_default(conn); mysqlnd_local_infile_default(conn);
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
{ {
unsigned int as_unicode = 1; unsigned int as_unicode = 1;
conn->m->set_client_option(conn, MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE, (char *)&as_unicode TSRMLS_CC); conn->m->set_client_option(conn, MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE, (char *)&as_unicode TSRMLS_CC);
@ -2052,7 +2052,7 @@ MYSQLND_METHOD(mysqlnd_conn, set_client_option)(MYSQLND * const conn,
case MYSQLND_OPT_NET_READ_BUFFER_SIZE: case MYSQLND_OPT_NET_READ_BUFFER_SIZE:
ret = conn->net->m.set_client_option(conn->net, option, value TSRMLS_CC); ret = conn->net->m.set_client_option(conn->net, option, value TSRMLS_CC);
break; break;
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
case MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE: case MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE:
conn->options.numeric_and_datetime_as_unicode = *(unsigned int*) value; conn->options.numeric_and_datetime_as_unicode = *(unsigned int*) value;
break; break;

View file

@ -1249,7 +1249,7 @@ PHPAPI struct st_mysqlnd_allocator_methods mysqlnd_allocator =
/* Follows code borrowed from zend_builtin_functions.c because the functions there are static */ /* Follows code borrowed from zend_builtin_functions.c because the functions there are static */
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
/* {{{ gettraceasstring() macros */ /* {{{ gettraceasstring() macros */
#define TRACE_APPEND_CHR(chr) \ #define TRACE_APPEND_CHR(chr) \
*str = (char*)erealloc(*str, *len + 1 + 1); \ *str = (char*)erealloc(*str, *len + 1 + 1); \

View file

@ -152,7 +152,7 @@ typedef enum mysqlnd_option
MYSQL_REPORT_DATA_TRUNCATION, MYSQL_REPORT_DATA_TRUNCATION,
MYSQL_OPT_RECONNECT, MYSQL_OPT_RECONNECT,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE = 200, MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE = 200,
#endif #endif
#ifdef MYSQLND_STRING_TO_INT_CONVERSION #ifdef MYSQLND_STRING_TO_INT_CONVERSION

View file

@ -33,6 +33,12 @@
#define Z_DELREF_PP(ppz) Z_DELREF_P(*(ppz)) #define Z_DELREF_PP(ppz) Z_DELREF_P(*(ppz))
#endif #endif
#if PHP_MAJOR_VERSION >= 6
#define MYSQLND_UNICODE 1
#else
#define MYSQLND_UNICODE 0
#endif
#ifdef ZTS #ifdef ZTS
#include "TSRM.h" #include "TSRM.h"
#endif #endif
@ -45,18 +51,18 @@
#define MYSQLND_CLASS_METHODS_START(class) struct st_##class##_methods MYSQLND_CLASS_METHOD_TABLE_NAME(class) = { #define MYSQLND_CLASS_METHODS_START(class) struct st_##class##_methods MYSQLND_CLASS_METHOD_TABLE_NAME(class) = {
#define MYSQLND_CLASS_METHODS_END } #define MYSQLND_CLASS_METHODS_END }
#if PHP_MAJOR_VERSION < 6 #if MYSQLND_UNICODE
#define mysqlnd_array_init(arg, field_count) \ #define mysqlnd_array_init(arg, field_count) \
{ \ { \
ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));\ ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));\
zend_hash_init(Z_ARRVAL_P(arg), (field_count), NULL, ZVAL_PTR_DTOR, 0); \ zend_u_hash_init(Z_ARRVAL_P(arg), (field_count), NULL, ZVAL_PTR_DTOR, 0, 0);\
Z_TYPE_P(arg) = IS_ARRAY;\ Z_TYPE_P(arg) = IS_ARRAY;\
} }
#else #else
#define mysqlnd_array_init(arg, field_count) \ #define mysqlnd_array_init(arg, field_count) \
{ \ { \
ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));\ ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));\
zend_u_hash_init(Z_ARRVAL_P(arg), (field_count), NULL, ZVAL_PTR_DTOR, 0, 0);\ zend_hash_init(Z_ARRVAL_P(arg), (field_count), NULL, ZVAL_PTR_DTOR, 0); \
Z_TYPE_P(arg) = IS_ARRAY;\ Z_TYPE_P(arg) = IS_ARRAY;\
} }
#endif #endif

View file

@ -869,7 +869,7 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int
if (IS_NULL != (Z_TYPE_P(stmt->result_bind[i].zv) = Z_TYPE_P(data)) ) { if (IS_NULL != (Z_TYPE_P(stmt->result_bind[i].zv) = Z_TYPE_P(data)) ) {
if ( if (
(Z_TYPE_P(data) == IS_STRING (Z_TYPE_P(data) == IS_STRING
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
|| Z_TYPE_P(data) == IS_UNICODE || Z_TYPE_P(data) == IS_UNICODE
#endif #endif
) )
@ -1059,7 +1059,7 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla
Z_TYPE_P(data), Z_REFCOUNT_P(stmt->result_bind[i].zv)); Z_TYPE_P(data), Z_REFCOUNT_P(stmt->result_bind[i].zv));
if (IS_NULL != (Z_TYPE_P(stmt->result_bind[i].zv) = Z_TYPE_P(data))) { if (IS_NULL != (Z_TYPE_P(stmt->result_bind[i].zv) = Z_TYPE_P(data))) {
if ((Z_TYPE_P(data) == IS_STRING if ((Z_TYPE_P(data) == IS_STRING
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
|| Z_TYPE_P(data) == IS_UNICODE || Z_TYPE_P(data) == IS_UNICODE
#endif #endif
) )

View file

@ -117,7 +117,7 @@ void ps_fetch_from_1_to_8_bytes(zval *zv, const MYSQLND_FIELD * const field,
} }
if (tmp_len) { if (tmp_len) {
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
if (as_unicode) { if (as_unicode) {
DBG_INF("stringify"); DBG_INF("stringify");
ZVAL_UTF8_STRINGL(zv, tmp, tmp_len, ZSTR_DUPLICATE); ZVAL_UTF8_STRINGL(zv, tmp, tmp_len, ZSTR_DUPLICATE);
@ -265,12 +265,12 @@ void ps_fetch_time(zval *zv, const MYSQLND_FIELD * const field,
length = spprintf(&to, 0, "%s%02u:%02u:%02u", (t.neg ? "-" : ""), t.hour, t.minute, t.second); length = spprintf(&to, 0, "%s%02u:%02u:%02u", (t.neg ? "-" : ""), t.hour, t.minute, t.second);
DBG_INF_FMT("%s", to); DBG_INF_FMT("%s", to);
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
if (!as_unicode) { if (!as_unicode) {
#endif #endif
ZVAL_STRINGL(zv, to, length, 1); ZVAL_STRINGL(zv, to, length, 1);
efree(to); /* allocated by spprintf */ efree(to); /* allocated by spprintf */
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
} else { } else {
ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE);
} }
@ -316,12 +316,12 @@ void ps_fetch_date(zval *zv, const MYSQLND_FIELD * const field,
length = spprintf(&to, 0, "%04u-%02u-%02u", t.year, t.month, t.day); length = spprintf(&to, 0, "%04u-%02u-%02u", t.year, t.month, t.day);
DBG_INF_FMT("%s", to); DBG_INF_FMT("%s", to);
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
if (!as_unicode) { if (!as_unicode) {
#endif #endif
ZVAL_STRINGL(zv, to, length, 1); ZVAL_STRINGL(zv, to, length, 1);
efree(to); /* allocated by spprintf */ efree(to); /* allocated by spprintf */
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
} else { } else {
ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE);
} }
@ -375,12 +375,12 @@ void ps_fetch_datetime(zval *zv, const MYSQLND_FIELD * const field,
t.year, t.month, t.day, t.hour, t.minute, t.second); t.year, t.month, t.day, t.hour, t.minute, t.second);
DBG_INF_FMT("%s", to); DBG_INF_FMT("%s", to);
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
if (!as_unicode) { if (!as_unicode) {
#endif #endif
ZVAL_STRINGL(zv, to, length, 1); ZVAL_STRINGL(zv, to, length, 1);
efree(to); /* allocated by spprintf */ efree(to); /* allocated by spprintf */
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
} else { } else {
ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE);
} }
@ -403,10 +403,7 @@ void ps_fetch_string(zval *zv, const MYSQLND_FIELD * const field,
unsigned long length = php_mysqlnd_net_field_length(row); unsigned long length = php_mysqlnd_net_field_length(row);
DBG_ENTER("ps_fetch_string"); DBG_ENTER("ps_fetch_string");
DBG_INF_FMT("len = %lu", length); DBG_INF_FMT("len = %lu", length);
#if PHP_MAJOR_VERSION < 6 #if MYSQLND_UNICODE
DBG_INF("copying from the row buffer");
ZVAL_STRINGL(zv, (char *)*row, length, 1);
#else
if (field->charsetnr == MYSQLND_BINARY_CHARSET_NR) { if (field->charsetnr == MYSQLND_BINARY_CHARSET_NR) {
DBG_INF("Binary charset"); DBG_INF("Binary charset");
ZVAL_STRINGL(zv, (char *)*row, length, 1); ZVAL_STRINGL(zv, (char *)*row, length, 1);
@ -414,6 +411,9 @@ void ps_fetch_string(zval *zv, const MYSQLND_FIELD * const field,
DBG_INF_FMT("copying from the row buffer"); DBG_INF_FMT("copying from the row buffer");
ZVAL_UTF8_STRINGL(zv, (char*)*row, length, ZSTR_DUPLICATE); ZVAL_UTF8_STRINGL(zv, (char*)*row, length, ZSTR_DUPLICATE);
} }
#else
DBG_INF("copying from the row buffer");
ZVAL_STRINGL(zv, (char *)*row, length, 1);
#endif #endif
(*row) += length; (*row) += length;
@ -704,10 +704,10 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar
break; break;
case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_VAR_STRING:
data_size += 8; /* max 8 bytes for size */ data_size += 8; /* max 8 bytes for size */
#if PHP_MAJOR_VERSION < 6 #if MYSQLND_UNICODE
if (Z_TYPE_P(the_var) != IS_STRING)
#elif PHP_MAJOR_VERSION >= 6
if (Z_TYPE_P(the_var) != IS_STRING || Z_TYPE_P(the_var) == IS_UNICODE) if (Z_TYPE_P(the_var) != IS_STRING || Z_TYPE_P(the_var) == IS_UNICODE)
#else
if (Z_TYPE_P(the_var) != IS_STRING)
#endif #endif
{ {
if (!copies || !copies[i]) { if (!copies || !copies[i]) {
@ -717,7 +717,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar
} }
} }
the_var = copies[i]; the_var = copies[i];
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
if (Z_TYPE_P(the_var) == IS_UNICODE) { if (Z_TYPE_P(the_var) == IS_UNICODE) {
zval_unicode_to_string_ex(the_var, UG(utf8_conv) TSRMLS_CC); zval_unicode_to_string_ex(the_var, UG(utf8_conv) TSRMLS_CC);
} }

View file

@ -814,7 +814,7 @@ mysqlnd_fetch_row_unbuffered(MYSQLND_RES * result, void *param, unsigned int fla
*/ */
Z_ADDREF_P(data); Z_ADDREF_P(data);
if (zend_hash_key->is_numeric == FALSE) { if (zend_hash_key->is_numeric == FALSE) {
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
zend_u_hash_quick_update(Z_ARRVAL_P(row), IS_UNICODE, zend_u_hash_quick_update(Z_ARRVAL_P(row), IS_UNICODE,
zend_hash_key->ustr, zend_hash_key->ustr,
zend_hash_key->ulen + 1, zend_hash_key->ulen + 1,
@ -1069,7 +1069,7 @@ mysqlnd_fetch_row_buffered(MYSQLND_RES * result, void *param, unsigned int flags
*/ */
Z_ADDREF_P(data); Z_ADDREF_P(data);
if (zend_hash_key->is_numeric == FALSE) { if (zend_hash_key->is_numeric == FALSE) {
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
zend_u_hash_quick_update(Z_ARRVAL_P(row), IS_UNICODE, zend_u_hash_quick_update(Z_ARRVAL_P(row), IS_UNICODE,
zend_hash_key->ustr, zend_hash_key->ustr,
zend_hash_key->ulen + 1, zend_hash_key->ulen + 1,

View file

@ -92,7 +92,7 @@ mysqlnd_is_key_numeric(char *key, size_t length, long *idx)
/* }}} */ /* }}} */
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
/* {{{ mysqlnd_unicode_is_key_numeric */ /* {{{ mysqlnd_unicode_is_key_numeric */
static zend_bool static zend_bool
mysqlnd_unicode_is_key_numeric(UChar *key, size_t length, long *idx) mysqlnd_unicode_is_key_numeric(UChar *key, size_t length, long *idx)
@ -142,7 +142,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met
{ {
unsigned int i = 0; unsigned int i = 0;
MYSQLND_PACKET_RES_FIELD * field_packet; MYSQLND_PACKET_RES_FIELD * field_packet;
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
UChar *ustr; UChar *ustr;
int ulen; int ulen;
#endif #endif
@ -227,7 +227,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met
} }
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen,
meta->fields[i].name, meta->fields[i].name,
meta->fields[i].name_length TSRMLS_CC); meta->fields[i].name_length TSRMLS_CC);
@ -284,7 +284,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, free)(MYSQLND_RES_METADATA * meta TSRMLS_DC)
if (meta->zend_hash_keys) { if (meta->zend_hash_keys) {
DBG_INF("Freeing zend_hash_keys"); DBG_INF("Freeing zend_hash_keys");
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
if (UG(unicode)) { if (UG(unicode)) {
for (i = 0; i < meta->field_count; i++) { for (i = 0; i < meta->field_count; i++) {
if (meta->zend_hash_keys[i].ustr.v) { if (meta->zend_hash_keys[i].ustr.v) {
@ -380,7 +380,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * co
/* copy the trailing \0 too */ /* copy the trailing \0 too */
memcpy(new_fields[i].def, orig_fields[i].def, orig_fields[i].def_length + 1); memcpy(new_fields[i].def, orig_fields[i].def, orig_fields[i].def_length + 1);
} }
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
if (new_meta->zend_hash_keys[i].ustr.u) { if (new_meta->zend_hash_keys[i].ustr.u) {
new_meta->zend_hash_keys[i].ustr.u = new_meta->zend_hash_keys[i].ustr.u =
eustrndup(new_meta->zend_hash_keys[i].ustr.u, new_meta->zend_hash_keys[i].ulen); eustrndup(new_meta->zend_hash_keys[i].ustr.u, new_meta->zend_hash_keys[i].ulen);

View file

@ -203,14 +203,14 @@ mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, const MYSQLND_STRING
mysqlnd_array_init(return_value, stats->count); mysqlnd_array_init(return_value, stats->count);
for (i = 0; i < stats->count; i++) { for (i = 0; i < stats->count; i++) {
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
UChar *ustr, *tstr; UChar *ustr, *tstr;
int ulen, tlen; int ulen, tlen;
#endif #endif
char tmp[25]; char tmp[25];
sprintf((char *)&tmp, MYSQLND_LLU_SPEC, stats->values[i]); sprintf((char *)&tmp, MYSQLND_LLU_SPEC, stats->values[i]);
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, names[i].s, names[i].l + 1 TSRMLS_CC); zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, names[i].s, names[i].l + 1 TSRMLS_CC);
zend_string_to_unicode(UG(utf8_conv), &tstr, &tlen, tmp, strlen(tmp) + 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); add_u_assoc_unicode_ex(return_value, IS_UNICODE, ZSTR(ustr), ulen, tstr, 1);

View file

@ -788,7 +788,7 @@ struct mysqlnd_field_hash_key
{ {
zend_bool is_numeric; zend_bool is_numeric;
unsigned long key; unsigned long key;
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
zstr ustr; zstr ustr;
unsigned int ulen; unsigned int ulen;
#endif #endif

View file

@ -1332,7 +1332,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
ZVAL_NULL(*current_field); ZVAL_NULL(*current_field);
last_field_was_string = FALSE; last_field_was_string = FALSE;
} else { } 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 = struct st_mysqlnd_perm_bind perm_bind =
mysqlnd_ps_fetch_functions[fields_metadata[i].type]; mysqlnd_ps_fetch_functions[fields_metadata[i].type];
#endif #endif
@ -1437,7 +1437,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
p -= len; p -= len;
if (Z_TYPE_PP(current_field) == IS_LONG) { if (Z_TYPE_PP(current_field) == IS_LONG) {
bit_area += 1 + sprintf((char *)start, "%ld", Z_LVAL_PP(current_field)); bit_area += 1 + sprintf((char *)start, "%ld", Z_LVAL_PP(current_field));
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
if (as_unicode) { if (as_unicode) {
ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0); ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0);
} else } 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 += Z_STRLEN_PP(current_field);
*bit_area++ = '\0'; *bit_area++ = '\0';
zval_dtor(*current_field); zval_dtor(*current_field);
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
if (as_unicode) { if (as_unicode) {
ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0); ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0);
} else } 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. the buffers are not referenced - everything is copied.
*/ */
} else } else
#if PHP_MAJOR_VERSION < 6 #if MYSQLND_UNICODE == 0
{ {
ZVAL_STRINGL(*current_field, (char *)p, len, 0); ZVAL_STRINGL(*current_field, (char *)p, len, 0);
} }

View file

@ -37,7 +37,7 @@ static zend_function_entry mysqlnd_functions[] = {
/* {{{ mysqlnd_minfo_print_hash */ /* {{{ mysqlnd_minfo_print_hash */
#if PHP_MAJOR_VERSION >= 6 #if MYSQLND_UNICODE
PHPAPI void mysqlnd_minfo_print_hash(zval *values) PHPAPI void mysqlnd_minfo_print_hash(zval *values)
{ {
zval **values_entry; zval **values_entry;