summaryrefslogtreecommitdiff
path: root/ext/hash/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/hash/hash.c')
-rw-r--r--ext/hash/hash.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index 449665a268..5b0c8570c9 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -570,7 +570,7 @@ PHP_FUNCTION(hash_copy)
return;
}
- RETVAL_OBJ(Z_OBJ_HANDLER_P(zhash, clone_obj)(zhash));
+ RETVAL_OBJ(Z_OBJ_HANDLER_P(zhash, clone_obj)(Z_OBJ_P(zhash)));
if (php_hashcontext_from_object(Z_OBJ_P(return_value))->context == NULL) {
zval_ptr_dtor(return_value);
@@ -1138,12 +1138,12 @@ static void php_hashcontext_dtor(zend_object *obj) {
/* }}} */
/* {{{ php_hashcontext_clone */
-static zend_object *php_hashcontext_clone(zval *pzv) {
- php_hashcontext_object *oldobj = php_hashcontext_from_object(Z_OBJ_P(pzv));
- zend_object *znew = php_hashcontext_create(Z_OBJCE_P(pzv));
+static zend_object *php_hashcontext_clone(zend_object *zobj) {
+ php_hashcontext_object *oldobj = php_hashcontext_from_object(zobj);
+ zend_object *znew = php_hashcontext_create(zobj->ce);
php_hashcontext_object *newobj = php_hashcontext_from_object(znew);
- zend_objects_clone_members(znew, Z_OBJ_P(pzv));
+ zend_objects_clone_members(znew, zobj);
newobj->ops = oldobj->ops;
newobj->options = oldobj->options;
@@ -1488,7 +1488,3 @@ zend_module_entry hash_module_entry = {
STANDARD_MODULE_PROPERTIES
};
/* }}} */
-
-#ifdef COMPILE_DL_HASH
-ZEND_GET_MODULE(hash)
-#endif