]> granicus.if.org Git - php/commitdiff
No need to copy the zval unless __clone() is called
authorMarcus Boerger <helly@php.net>
Tue, 20 May 2003 20:20:57 +0000 (20:20 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 20 May 2003 20:20:57 +0000 (20:20 +0000)
Zend/zend_execute.c

index f3779e3918baa0970b8b25a1fe5bd20170b8ac00..1f4e8130f2a2823cc5d7e956c7a1cdddd4360a1c 100644 (file)
@@ -2422,7 +2422,7 @@ int zend_init_ctor_call_handler(ZEND_OPCODE_HANDLER_ARGS)
 
        /* We are not handling overloaded classes right now */
        EX(object) = get_zval_ptr(&EX(opline)->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
-       if (!PZVAL_IS_REF(EX(object))) {
+       if (!PZVAL_IS_REF(EX(object)) || !EG(implicit_clone)) {
                EX(object)->refcount++; /* For $this pointer */
        } else {
                zval *this_ptr;