summaryrefslogtreecommitdiff
path: root/Zend/zend_objects.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-03-18 14:10:45 +0000
committerFelipe Pena <felipe@php.net>2008-03-18 14:10:45 +0000
commit2b10c53ae16bb79c5f6dd0da61d6b3c451251802 (patch)
tree97ff7a379e380d56f87547587fafb8540761ad25 /Zend/zend_objects.c
parent8b01532f64cfeb88270b1a8b13c52dd76aa3d999 (diff)
downloadphp-git-2b10c53ae16bb79c5f6dd0da61d6b3c451251802.tar.gz
MFH: Dropped zend.ze1_compatibility_mode
[DOC]
Diffstat (limited to 'Zend/zend_objects.c')
-rw-r--r--Zend/zend_objects.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c
index 5d131f1077..3dcc15eaaf 100644
--- a/Zend/zend_objects.c
+++ b/Zend/zend_objects.c
@@ -140,33 +140,10 @@ ZEND_API zend_object *zend_objects_get_address(zval *zobject TSRMLS_DC)
return (zend_object *)zend_object_store_get_object(zobject TSRMLS_CC);
}
-static void zval_add_ref_or_clone(zval **p)
-{
- if (Z_TYPE_PP(p) == IS_OBJECT && !PZVAL_IS_REF(*p)) {
- TSRMLS_FETCH();
-
- if (Z_OBJ_HANDLER_PP(p, clone_obj) == NULL) {
- zend_error(E_ERROR, "Trying to clone an uncloneable object of class %s", Z_OBJCE_PP(p)->name);
- } else {
- zval *orig = *p;
-
- ALLOC_ZVAL(*p);
- **p = *orig;
- INIT_PZVAL(*p);
- (*p)->value.obj = Z_OBJ_HT_PP(p)->clone_obj(orig TSRMLS_CC);
- }
- } else {
- Z_ADDREF_PP(p);
- }
-}
-
ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC)
{
- if (EG(ze1_compatibility_mode)) {
- zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref_or_clone, (void *) NULL /* Not used anymore */, sizeof(zval *));
- } else {
- zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, sizeof(zval *));
- }
+ zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, sizeof(zval *));
+
if (old_object->ce->clone) {
zval *new_obj;