diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-26 10:54:40 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-26 10:54:40 +0200 |
commit | 1314ccbf8c3731f000e2c32f34dad21b053333f3 (patch) | |
tree | 06eefc0988942a2ee8201fcedc8b54dd97497bf1 /Zend/zend_interfaces.c | |
parent | b6deace022a792ffe7139cfb82654095cfd27364 (diff) | |
download | php-git-1314ccbf8c3731f000e2c32f34dad21b053333f3.tar.gz |
Cache __unserialize() instead of unserialize()
We should use these cache slots for the new object serialization
mechanism rather than the old one.
Diffstat (limited to 'Zend/zend_interfaces.c')
-rw-r--r-- | Zend/zend_interfaces.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 3009af2b3f..a100176c36 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -357,7 +357,8 @@ ZEND_API int zend_user_serialize(zval *object, unsigned char **buffer, size_t *b zval retval; int result; - zend_call_known_instance_method_with_0_params(ce->serialize_func, Z_OBJ_P(object), &retval); + zend_call_method_with_0_params( + Z_OBJ_P(object), Z_OBJCE_P(object), NULL, "serialize", &retval); if (Z_TYPE(retval) == IS_UNDEF || EG(exception)) { result = FAILURE; @@ -396,8 +397,8 @@ ZEND_API int zend_user_unserialize(zval *object, zend_class_entry *ce, const uns } ZVAL_STRINGL(&zdata, (char*)buf, buf_len); - zend_call_known_instance_method_with_1_params( - ce->unserialize_func, Z_OBJ_P(object), NULL, &zdata); + zend_call_method_with_1_params( + Z_OBJ_P(object), Z_OBJCE_P(object), NULL, "unserialize", NULL, &zdata); zval_ptr_dtor(&zdata); if (EG(exception)) { |