]> granicus.if.org Git - php/commitdiff
fix datatype mismatch and warning
authorAnatol Belski <ab@php.net>
Wed, 22 Oct 2014 07:37:25 +0000 (09:37 +0200)
committerAnatol Belski <ab@php.net>
Wed, 22 Oct 2014 15:56:20 +0000 (17:56 +0200)
ext/standard/var.c

index 4d00a4ab2f9edcf852500d51da8e5ee070752a1c..4f0bd24bdc9f4f07e120de42fe6f268b26403d7f 100644 (file)
@@ -594,7 +594,7 @@ PHP_FUNCTION(var_export)
 
 static void php_var_serialize_intern(smart_str *buf, zval *struc, php_serialize_data_t var_hash TSRMLS_DC);
 
-static inline uint32_t php_add_var_hash(php_serialize_data_t data, zval *var TSRMLS_DC) /* {{{ */
+static inline zend_long php_add_var_hash(php_serialize_data_t data, zval *var TSRMLS_DC) /* {{{ */
 {
        zval *zv;
        zend_ulong key;
@@ -772,7 +772,7 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
 
 static void php_var_serialize_intern(smart_str *buf, zval *struc, php_serialize_data_t var_hash TSRMLS_DC) /* {{{ */
 {
-       uint32_t var_already;
+       zend_long var_already;
        HashTable *myht;
 
        if (EG(exception)) {
@@ -816,7 +816,7 @@ again:
 
                                smart_str_appendl(buf, "d:", 2);
                                s = (char *) safe_emalloc(PG(serialize_precision), 1, MAX_LENGTH_OF_DOUBLE + 1);
-                               php_gcvt(Z_DVAL_P(struc), PG(serialize_precision), '.', 'E', s);
+                               php_gcvt(Z_DVAL_P(struc), (int)PG(serialize_precision), '.', 'E', s);
                                smart_str_appends(buf, s);
                                smart_str_appendc(buf, ';');
                                efree(s);