andrey          Wed May 27 15:05:28 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/mysqli mysqli_prop.c 
  Log:
  MFH: Revert in regard of my_ulonglong which should be used instead of long
  which can be anything.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_prop.c?r1=1.23.2.5.2.2.2.12&r2=1.23.2.5.2.2.2.13&diff_format=u
Index: php-src/ext/mysqli/mysqli_prop.c
diff -u php-src/ext/mysqli/mysqli_prop.c:1.23.2.5.2.2.2.12 
php-src/ext/mysqli/mysqli_prop.c:1.23.2.5.2.2.2.13
--- php-src/ext/mysqli/mysqli_prop.c:1.23.2.5.2.2.2.12  Wed May 20 08:30:12 2009
+++ php-src/ext/mysqli/mysqli_prop.c    Wed May 27 15:05:28 2009
@@ -15,7 +15,7 @@
   | Author: Georg Richter <ge...@php.net>                                |
   +----------------------------------------------------------------------+
 
-  $Id: mysqli_prop.c,v 1.23.2.5.2.2.2.12 2009/05/20 08:30:12 kalle Exp $ 
+  $Id: mysqli_prop.c,v 1.23.2.5.2.2.2.13 2009/05/27 15:05:28 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -83,7 +83,7 @@
        } else {\
                l = (__ret_type)__int_func(p);\
                if (l < LONG_MAX) {\
-                       ZVAL_LONG(*retval, (long) l);\
+                       ZVAL_LONG(*retval, l);\
                } else { \
                        char *ret; \
                        int ret_len = spprintf(&ret, 0, __ret_type_sprint_mod, 
l); \
@@ -156,7 +156,7 @@
 static int link_affected_rows_read(mysqli_object *obj, zval **retval TSRMLS_DC)
 {
        MY_MYSQL *mysql;
-       long rc;
+       my_ulonglong rc;
 
        MAKE_STD_ZVAL(*retval); 
 
@@ -169,9 +169,9 @@
        } else {
                CHECK_STATUS(MYSQLI_STATUS_VALID);
 
-               rc = (long) mysql_affected_rows(mysql->mysql);
+               rc = mysql_affected_rows(mysql->mysql);
 
-               if (rc == (long)-1) {
+               if (rc == (my_ulonglong) -1) {
                        ZVAL_LONG(*retval, -1);
                        return SUCCESS;
                } 
@@ -189,18 +189,18 @@
 /* }}} */
 
 /* link properties */
-MYSQLI_MAP_PROPERTY_FUNC_LONG(link_errno_read, mysql_errno, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_INITIALIZED), ulong, "%llu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(link_errno_read, mysql_errno, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_INITIALIZED), ulong, "%lu");
 MYSQLI_MAP_PROPERTY_FUNC_STRING(link_error_read, mysql_error, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_INITIALIZED));
-MYSQLI_MAP_PROPERTY_FUNC_LONG(link_field_count_read, mysql_field_count, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%llu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(link_field_count_read, mysql_field_count, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu");
 MYSQLI_MAP_PROPERTY_FUNC_STRING(link_host_info_read, mysql_get_host_info, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID));
 MYSQLI_MAP_PROPERTY_FUNC_STRING(link_info_read, mysql_info, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID));
 MYSQLI_MAP_PROPERTY_FUNC_LONG(link_insert_id_read, mysql_insert_id, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC);
-MYSQLI_MAP_PROPERTY_FUNC_LONG(link_protocol_version_read, 
mysql_get_proto_info, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%llu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(link_protocol_version_read, 
mysql_get_proto_info, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu");
 MYSQLI_MAP_PROPERTY_FUNC_STRING(link_server_info_read, mysql_get_server_info, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID));
-MYSQLI_MAP_PROPERTY_FUNC_LONG(link_server_version_read, 
mysql_get_server_version, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%llu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(link_server_version_read, 
mysql_get_server_version, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu");
 MYSQLI_MAP_PROPERTY_FUNC_STRING(link_sqlstate_read, mysql_sqlstate, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID));
-MYSQLI_MAP_PROPERTY_FUNC_LONG(link_thread_id_read, mysql_thread_id, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%llu");
-MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%llu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(link_thread_id_read, mysql_thread_id, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, 
MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu");
 /* result properties */
 
 /* {{{ property result_type_read */
@@ -231,8 +231,7 @@
 
        CHECK_STATUS(MYSQLI_STATUS_VALID);
        p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
-       if (!p || !p->field_count || !(ret = mysql_fetch_lengths(p)))
-       {
+       if (!p || !p->field_count || !(ret = mysql_fetch_lengths(p))) {
                ZVAL_NULL(*retval);
        } else {
                ulong i;
@@ -248,8 +247,8 @@
 /* }}} */
 
 
-MYSQLI_MAP_PROPERTY_FUNC_LONG(result_current_field_read, mysql_field_tell, 
MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), ulong, "%llu");
-MYSQLI_MAP_PROPERTY_FUNC_LONG(result_field_count_read, mysql_num_fields, 
MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), ulong, "%llu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(result_current_field_read, mysql_field_tell, 
MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), ulong, "%lu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(result_field_count_read, mysql_num_fields, 
MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), ulong, "%lu");
 MYSQLI_MAP_PROPERTY_FUNC_LONG(result_num_rows_read, mysql_num_rows, 
MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC);
 
 /* statement properties */
@@ -277,7 +276,7 @@
 static int stmt_affected_rows_read(mysqli_object *obj, zval **retval TSRMLS_DC)
 {
        MY_STMT *p;
-       long rc;
+       my_ulonglong rc;
 
        MAKE_STD_ZVAL(*retval); 
        CHECK_STATUS(MYSQLI_STATUS_VALID);
@@ -287,9 +286,9 @@
        if (!p) {
                ZVAL_NULL(*retval);
        } else {
-               rc = (long) mysql_stmt_affected_rows(p->stmt);
+               rc = mysql_stmt_affected_rows(p->stmt);
        
-               if (rc == (long)-1) {
+               if (rc == (my_ulonglong) -1) {
                        ZVAL_LONG(*retval, -1);
                        return SUCCESS;
                } 
@@ -308,9 +307,9 @@
 
 MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_insert_id_read, mysql_stmt_insert_id, 
MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC);
 MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_num_rows_read, mysql_stmt_num_rows, 
MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC);
-MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_param_count_read, mysql_stmt_param_count, 
MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), ulong, "%llu");
-MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_field_count_read, mysql_stmt_field_count, 
MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), ulong, "%llu");
-MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_errno_read, mysql_stmt_errno, 
MYSQLI_GET_STMT(MYSQLI_STATUS_INITIALIZED), ulong, "%llu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_param_count_read, mysql_stmt_param_count, 
MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), ulong, "%lu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_field_count_read, mysql_stmt_field_count, 
MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), ulong, "%lu");
+MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_errno_read, mysql_stmt_errno, 
MYSQLI_GET_STMT(MYSQLI_STATUS_INITIALIZED), ulong, "%lu");
 MYSQLI_MAP_PROPERTY_FUNC_STRING(stmt_error_read, mysql_stmt_error, 
MYSQLI_GET_STMT(MYSQLI_STATUS_INITIALIZED));
 MYSQLI_MAP_PROPERTY_FUNC_STRING(stmt_sqlstate_read, mysql_stmt_sqlstate, 
MYSQLI_GET_STMT(MYSQLI_STATUS_INITIALIZED));
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to