PHP mysqlnd svn commit: r834 - trunk/mysqlnd
Author: ahristov
Date: 2007-07-23 16:38:49 +0200 (Mon, 23 Jul 2007)
New Revision: 834
Modified:
trunk/mysqlnd/mysqlnd_wireprotocol.c
Log:
Fix PHP5 build
Modified: trunk/mysqlnd/mysqlnd_wireprotocol.c
- trunk/mysqlnd/mysqlnd_wireprotocol.c 2007-07-23 10:51:27 UTC (rev 833)
+++ trunk/mysqlnd/mysqlnd_wireprotocol.c 2007-07-23 14:38:49 UTC (rev 834)
@@ -1359,13 +1359,27 @@
if (Z_TYPE_PP(current_field) == IS_LONG) {
bit_area += 1 + sprintf((char *)start, MYSQLND_LLU_SPEC,
(my_int64) Z_LVAL_PP(current_field));
- ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0);
+#if PHP_MAJOR_VERSION >= 6
+ if (as_unicode) {
+ ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0);
+ } else
+#endif
+ {
+ ZVAL_STRINGL(*current_field, start, bit_area - start - 1, 0);
+ }
} else if (Z_TYPE_PP(current_field) == IS_STRING){
memcpy(bit_area, Z_STRVAL_PP(current_field), Z_STRLEN_PP(current_field));
bit_area += Z_STRLEN_PP(current_field);
*bit_area++ = '\0';
zval_dtor(*current_field);
- ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0);
+#if PHP_MAJOR_VERSION >= 6
+ if (as_unicode) {
+ ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0);
+ } else
+#endif
+ {
+ ZVAL_STRINGL(*current_field, start, bit_area - start - 1, 0);
+ }
}
/*
IS_UNICODE should not be specially handled. In unicode mode
--
MySQL Code Commits Mailing List
For list archives:
http://lists.mysql.com/commits
To unsubscribe:
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Mon Jul 23 12:16:01 2007
This archive was generated by hypermail 2.1.8
: Thu Aug 09 2007 - 19:11:17 EDT
|