diff options
author | Nikita Popov <nikic@php.net> | 2014-09-18 23:00:14 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2014-09-18 23:03:27 +0200 |
commit | 8a9dd4a1d75a9b8929914c383ef55dec2c455551 (patch) | |
tree | 677a2c093e299d5b64db5d3ed57a2b05a3761971 /ext | |
parent | 21514b0d9a9479430d5f70b6f1c27a703138f113 (diff) | |
download | php-git-8a9dd4a1d75a9b8929914c383ef55dec2c455551.tar.gz |
Fix GMP serialization
Also fix same issue in PDO.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/gmp/gmp.c | 4 | ||||
-rw-r--r-- | ext/pdo/pdo_stmt.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 7eb9eef494..2d4b5fc8c1 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -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; diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index dd8b01a5b4..b0aa35fda7 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -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; |