]> granicus.if.org Git - php/commitdiff
Fix GMP serialization
authorNikita Popov <nikic@php.net>
Thu, 18 Sep 2014 21:00:14 +0000 (23:00 +0200)
committerNikita Popov <nikic@php.net>
Thu, 18 Sep 2014 21:03:27 +0000 (23:03 +0200)
Also fix same issue in PDO.

ext/gmp/gmp.c
ext/pdo/pdo_stmt.c
main/php_version.h

index 7eb9eef494773de98eff6411f1134bc78598c90b..2d4b5fc8c11398c5b2144eba469687b6efcf5a85 100644 (file)
@@ -569,7 +569,7 @@ static int gmp_compare(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
 }
 /* }}} */
 
-static int gmp_serialize(zval *object, unsigned char **buffer, uint32_t *buf_len, zend_serialize_data *data TSRMLS_DC) /* {{{ */
+static int gmp_serialize(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data TSRMLS_DC) /* {{{ */
 {
        mpz_ptr gmpnum = GET_GMP_FROM_ZVAL(object);
        smart_str buf = {0};
@@ -596,7 +596,7 @@ static int gmp_serialize(zval *object, unsigned char **buffer, uint32_t *buf_len
 }
 /* }}} */
 
-static int gmp_unserialize(zval *object, zend_class_entry *ce, const unsigned char *buf, uint32_t buf_len, zend_unserialize_data *data TSRMLS_DC) /* {{{ */
+static int gmp_unserialize(zval *object, zend_class_entry *ce, const unsigned char *buf, size_t buf_len, zend_unserialize_data *data TSRMLS_DC) /* {{{ */
 {
        mpz_ptr gmpnum;
        const unsigned char *p, *max;
index dd8b01a5b4f629558d468194f0ceada9481f73a0..b0aa35fda7ce1758dee81da6ec1287c8f2c53b46 100644 (file)
@@ -2267,7 +2267,7 @@ static zend_object *dbstmt_clone_obj(zval *zobject TSRMLS_DC)
 }
 
 zend_object_handlers pdo_dbstmt_object_handlers;
-static int pdo_row_serialize(zval *object, unsigned char **buffer, uint32_t *buf_len, zend_serialize_data *data TSRMLS_DC);
+static int pdo_row_serialize(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data TSRMLS_DC);
 
 void pdo_stmt_init(TSRMLS_D)
 {
@@ -2700,7 +2700,7 @@ zend_object *pdo_row_new(zend_class_entry *ce TSRMLS_DC)
        return &row->std;
 }
 
-static int pdo_row_serialize(zval *object, unsigned char **buffer, uint32_t *buf_len, zend_serialize_data *data TSRMLS_DC)
+static int pdo_row_serialize(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data TSRMLS_DC)
 {
        php_error_docref(NULL TSRMLS_CC, E_WARNING, "PDORow instances may not be serialized");
        return FAILURE;
index 186d9d2b7d54a1e3c7660b19706dc439b3808a80..d48ab241411eb5358927ef8de358f3dcae593689 100644 (file)
@@ -6,4 +6,3 @@
 #define PHP_EXTRA_VERSION "-dev"
 #define PHP_VERSION "7.0.0-dev"
 #define PHP_VERSION_ID 70000
-