dmitry          Thu Mar 16 10:33:23 2006 UTC

  Removed files:               
    /ZendEngine2/tests  bug30332.phpt bug31828.phpt bug32080.phpt 
                        bug32852.phpt bug33243.phpt bug34712.phpt 
                        bug34767.phpt 
    /php-src/tests/lang bug22367.phpt 

  Modified files:              
    /php-src    NEWS 
    /ZendEngine2        zend.c zend_API.c zend_execute.c zend_execute.h 
                        zend_execute_API.c zend_globals.h zend_objects.c 
                        zend_operators.c zend_vm_def.h zend_vm_execute.h 
    /php-src/ext/dom    php_dom.c 
    /php-src/ext/simplexml      simplexml.c 
    /php-src/main       main.c 
  Log:
  Dropped zend.ze1_compatibility_mode
  
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2101&r2=1.2102&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2101 php-src/NEWS:1.2102
--- php-src/NEWS:1.2101 Thu Mar 16 09:44:41 2006
+++ php-src/NEWS        Thu Mar 16 10:33:22 2006
@@ -3,6 +3,7 @@
 ?? ??? ????, PHP 6.0
 - Unicode support. (Andrei, Dmitry, et al)
 - Dropped safe_mode support (Ilia, Andi)
+- Dropped zend.ze1_compatibility_mode (Dmitry)
 - Dropped register_long_arrays (Dmitry)
 - Droped register_globals support (Pierre)
   - session_register, session_unregister and session_is_registered removed they
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend.c?r1=1.341&r2=1.342&diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.341 ZendEngine2/zend.c:1.342
--- ZendEngine2/zend.c:1.341    Thu Mar  2 00:40:19 2006
+++ ZendEngine2/zend.c  Thu Mar 16 10:33:23 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend.c,v 1.341 2006/03/02 00:40:19 helly Exp $ */
+/* $Id: zend.c,v 1.342 2006/03/16 10:33:23 dmitry Exp $ */
 
 #include "zend.h"
 #include "zend_extensions.h"
@@ -210,7 +210,6 @@
 
 ZEND_INI_BEGIN()
        ZEND_INI_ENTRY("error_reporting",                       NULL,           
ZEND_INI_ALL,           OnUpdateErrorReporting)
-       STD_ZEND_INI_BOOLEAN("zend.ze1_compatibility_mode",     "0",    
ZEND_INI_ALL,           OnUpdateBool,   ze1_compatibility_mode, 
zend_executor_globals,  executor_globals)
 
        /* Unicode .ini entries */
        STD_ZEND_INI_BOOLEAN("unicode_semantics", "0", ZEND_INI_SYSTEM, 
OnUpdateBool, unicode, zend_unicode_globals, unicode_globals)
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.c?r1=1.353&r2=1.354&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.353 ZendEngine2/zend_API.c:1.354
--- ZendEngine2/zend_API.c:1.353        Sun Mar  5 16:09:45 2006
+++ ZendEngine2/zend_API.c      Thu Mar 16 10:33:23 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_API.c,v 1.353 2006/03/05 16:09:45 helly Exp $ */
+/* $Id: zend_API.c,v 1.354 2006/03/16 10:33:23 dmitry Exp $ */
 
 #include "zend.h"
 #include "zend_execute.h"
@@ -154,25 +154,6 @@
        while (param_count-->0) {
                zval **value = (zval**)(p-arg_count);
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_PP(value) == 
IS_OBJECT) {
-                       zval *value_ptr;
-                       zstr class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       dup = zend_get_object_classname(*value, &class_name, 
&class_name_len TSRMLS_CC);
-
-                       ALLOC_ZVAL(value_ptr);
-                       *value_ptr = **value;
-                       INIT_PZVAL(value_ptr);
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%v' because of 'zend.ze1_compatibility_mode'", class_name.v);
-                       if(!dup) {
-                               efree(class_name.v);
-                       }
-                       Z_OBJVAL_P(value_ptr) = Z_OBJ_HANDLER_PP(value, 
clone_obj)(*value TSRMLS_CC);
-                       zval_ptr_dtor(value);
-                       *value = value_ptr;
-               }
                *(argument_array++) = value;
                arg_count--;
        }
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_execute.c?r1=1.738&r2=1.739&diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.738 ZendEngine2/zend_execute.c:1.739
--- ZendEngine2/zend_execute.c:1.738    Sun Feb 26 11:57:14 2006
+++ ZendEngine2/zend_execute.c  Thu Mar 16 10:33:23 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_execute.c,v 1.738 2006/02/26 11:57:14 dmitry Exp $ */
+/* $Id: zend_execute.c,v 1.739 2006/03/16 10:33:23 dmitry Exp $ */
 
 #define ZEND_INTENSIVE_DEBUGGING 0
 
@@ -598,26 +598,7 @@
        /* here we are sure we are dealing with an object */
 
        /* separate our value if necessary */
-       if (EG(ze1_compatibility_mode) && Z_TYPE_P(value) == IS_OBJECT) {
-               zval *orig_value = value;
-               zstr class_name;
-               zend_uint class_name_len;
-               int dup;
-
-               ALLOC_ZVAL(value);
-               *value = *orig_value;
-               value->is_ref = 0;
-               value->refcount = 0;
-               dup = zend_get_object_classname(orig_value, &class_name, 
&class_name_len TSRMLS_CC);
-               if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) {
-                       zend_error_noreturn(E_ERROR, "Trying to clone an 
uncloneable object of class %v",  class_name.v);
-               }
-               zend_error(E_STRICT, "Implicit cloning object of class '%v' 
because of 'zend.ze1_compatibility_mode'", class_name.v);
-               Z_OBJVAL_P(value) = Z_OBJ_HANDLER_P(orig_value, 
clone_obj)(orig_value TSRMLS_CC);
-               if (!dup) {
-                       efree(class_name.v);
-               }
-       } else if (value_op->op_type == IS_TMP_VAR) {
+       if (value_op->op_type == IS_TMP_VAR) {
                zval *orig_value = value;
 
                ALLOC_ZVAL(value);
@@ -807,60 +788,11 @@
        }
 
        if (Z_TYPE_P(variable_ptr) == IS_OBJECT && 
Z_OBJ_HANDLER_P(variable_ptr, set)) {
-               /* TODO? ze1_compatibility_mode support */
                Z_OBJ_HANDLER_P(variable_ptr, set)(variable_ptr_ptr, value 
TSRMLS_CC);
                goto done_setting_var;
        }
 
-       if (EG(ze1_compatibility_mode) && Z_TYPE_P(value) == IS_OBJECT) {
-               zstr class_name;
-               zend_uint class_name_len;
-               int dup;
-
-               dup = zend_get_object_classname(value, &class_name, 
&class_name_len TSRMLS_CC);
-
-               if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) {
-                       zend_error_noreturn(E_ERROR, "Trying to clone an 
uncloneable object of class %v",  class_name.v);
-               } else if (PZVAL_IS_REF(variable_ptr)) {
-                       if (variable_ptr != value) {
-                               zend_uint refcount = variable_ptr->refcount;
-                               zval garbage;
-
-                               if (type != IS_TMP_VAR) {
-                                       value->refcount++;
-                               }
-                               garbage = *variable_ptr;
-                               *variable_ptr = *value;
-                               variable_ptr->refcount = refcount;
-                               variable_ptr->is_ref = 1;
-                               zend_error(E_STRICT, "Implicit cloning object 
of class '%v' because of 'zend.ze1_compatibility_mode'", class_name.v);
-                               Z_OBJVAL_P(variable_ptr) = 
Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC);
-                               if (type != IS_TMP_VAR) {
-                                       value->refcount--;
-                               }
-                               zendi_zval_dtor(garbage);
-                       }
-               } else {
-                       if (variable_ptr != value) {
-                               value->refcount++;
-                               variable_ptr->refcount--;
-                               if (variable_ptr->refcount == 0) {
-                                       zendi_zval_dtor(*variable_ptr);
-                               } else {
-                                       ALLOC_ZVAL(variable_ptr);
-                                       *variable_ptr_ptr = variable_ptr;
-                               }
-                               *variable_ptr = *value;
-                               INIT_PZVAL(variable_ptr);
-                               zend_error(E_STRICT, "Implicit cloning object 
of class '%v' because of 'zend.ze1_compatibility_mode'", class_name.v);
-                               Z_OBJVAL_P(variable_ptr) = 
Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC);
-                               zval_ptr_dtor(&value);
-                       }
-               }
-               if (!dup) {
-                       efree(class_name.v);
-               }
-       } else if (PZVAL_IS_REF(variable_ptr)) {
+       if (PZVAL_IS_REF(variable_ptr)) {
                if (variable_ptr!=value) {
                        zend_uint refcount = variable_ptr->refcount;
                        zval garbage;
@@ -950,34 +882,9 @@
 
 static inline void zend_receive(zval **variable_ptr_ptr, zval *value TSRMLS_DC)
 {
-       zval *variable_ptr = *variable_ptr_ptr;
-
-       if (EG(ze1_compatibility_mode) && Z_TYPE_P(value) == IS_OBJECT) {
-               zstr class_name;
-               zend_uint class_name_len;
-               int dup;
-
-               dup = zend_get_object_classname(value, &class_name, 
&class_name_len TSRMLS_CC);
-
-               if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) {
-                       zend_error_noreturn(E_ERROR, "Trying to clone an 
uncloneable object of class %v",  class_name.v);
-               } else {
-                       variable_ptr->refcount--;
-                       ALLOC_ZVAL(variable_ptr);
-                       *variable_ptr_ptr = variable_ptr;
-                       *variable_ptr = *value;
-                       INIT_PZVAL(variable_ptr);
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%v' because of 'zend.ze1_compatibility_mode'", class_name.v);
-                       Z_OBJVAL_P(variable_ptr) = Z_OBJ_HANDLER_P(value, 
clone_obj)(value TSRMLS_CC);
-               }
-               if (!dup) {
-                       efree(class_name.v);
-               }
-       } else {
-               variable_ptr->refcount--;
-               *variable_ptr_ptr = value;
-               value->refcount++;
-       }
+       (*variable_ptr_ptr)->refcount--;
+       *variable_ptr_ptr = value;
+       value->refcount++;
 }
 
 /* Utility Functions for Extensions */
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_execute.h?r1=1.98&r2=1.99&diff_format=u
Index: ZendEngine2/zend_execute.h
diff -u ZendEngine2/zend_execute.h:1.98 ZendEngine2/zend_execute.h:1.99
--- ZendEngine2/zend_execute.h:1.98     Fri Mar  3 23:23:17 2006
+++ ZendEngine2/zend_execute.h  Thu Mar 16 10:33:23 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_execute.h,v 1.98 2006/03/03 23:23:17 andrei Exp $ */
+/* $Id: zend_execute.h,v 1.99 2006/03/16 10:33:23 dmitry Exp $ */
 
 #ifndef ZEND_EXECUTE_H
 #define ZEND_EXECUTE_H
@@ -132,15 +132,8 @@
                                                break;
                                        }
                                }
-
-                               if(EG(ze1_compatibility_mode)) {
-                                       result = 
(zend_hash_num_elements(Z_OBJPROP_P(op))?1:0);
-                               } else {
-                                       result = 1;
-                               }
-                       } else {
-                               result = 1;
                        }
+                       result = 1;
                        break;
                default:
                        result = 0;
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_execute_API.c?r1=1.369&r2=1.370&diff_format=u
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.369 
ZendEngine2/zend_execute_API.c:1.370
--- ZendEngine2/zend_execute_API.c:1.369        Tue Mar 14 11:24:30 2006
+++ ZendEngine2/zend_execute_API.c      Thu Mar 16 10:33:23 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_execute_API.c,v 1.369 2006/03/14 11:24:30 dmitry Exp $ */
+/* $Id: zend_execute_API.c,v 1.370 2006/03/16 10:33:23 dmitry Exp $ */
 
 #include <stdio.h>
 #include <signal.h>
@@ -412,13 +412,6 @@
                zval_dtor(*zval_ptr);
                safe_free_zval_ptr_rel(*zval_ptr ZEND_FILE_LINE_RELAY_CC 
ZEND_FILE_LINE_CC);
        } else if ((*zval_ptr)->refcount == 1) {
-               if (Z_TYPE_PP(zval_ptr) == IS_OBJECT) {
-                       TSRMLS_FETCH();
-
-                       if (EG(ze1_compatibility_mode)) {
-                               return;
-                       }
-               }
                (*zval_ptr)->is_ref = 0;
        }
 }
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_globals.h?r1=1.149&r2=1.150&diff_format=u
Index: ZendEngine2/zend_globals.h
diff -u ZendEngine2/zend_globals.h:1.149 ZendEngine2/zend_globals.h:1.150
--- ZendEngine2/zend_globals.h:1.149    Fri Mar 10 08:29:22 2006
+++ ZendEngine2/zend_globals.h  Thu Mar 16 10:33:23 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_globals.h,v 1.149 2006/03/10 08:29:22 dmitry Exp $ */
+/* $Id: zend_globals.h,v 1.150 2006/03/16 10:33:23 dmitry Exp $ */
 
 #ifndef ZEND_GLOBALS_H
 #define ZEND_GLOBALS_H
@@ -195,7 +195,6 @@
        zend_function *autoload_func;
        zend_bool bailout_set;
        zend_bool full_tables_cleanup;
-       zend_bool ze1_compatibility_mode;
 
        /* for extended information support */
        zend_bool no_extensions;
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_objects.c?r1=1.64&r2=1.65&diff_format=u
Index: ZendEngine2/zend_objects.c
diff -u ZendEngine2/zend_objects.c:1.64 ZendEngine2/zend_objects.c:1.65
--- ZendEngine2/zend_objects.c:1.64     Sun Feb 26 11:57:14 2006
+++ ZendEngine2/zend_objects.c  Thu Mar 16 10:33:23 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_objects.c,v 1.64 2006/02/26 11:57:14 dmitry Exp $ */
+/* $Id: zend_objects.c,v 1.65 2006/03/16 10:33:23 dmitry Exp $ */
 
 #include "zend.h"
 #include "zend_globals.h"
@@ -114,33 +114,9 @@
        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 %v",  Z_OBJCE_PP(p)->name);
-               } else {
-                       zval *orig = *p;
-
-                       ALLOC_ZVAL(*p);
-                       **p = *orig;
-                       INIT_PZVAL(*p);
-                       Z_OBJVAL_PP(p) = Z_OBJ_HT_PP(p)->clone_obj(orig 
TSRMLS_CC);
-               }
-       } else {
-               (*p)->refcount++;
-       }
-}
-
 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;
 
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_operators.c?r1=1.235&r2=1.236&diff_format=u
Index: ZendEngine2/zend_operators.c
diff -u ZendEngine2/zend_operators.c:1.235 ZendEngine2/zend_operators.c:1.236
--- ZendEngine2/zend_operators.c:1.235  Sun Feb 26 11:57:14 2006
+++ ZendEngine2/zend_operators.c        Thu Mar 16 10:33:23 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_operators.c,v 1.235 2006/02/26 11:57:14 dmitry Exp $ */
+/* $Id: zend_operators.c,v 1.236 2006/03/16 10:33:23 dmitry Exp $ */
 
 #include <ctype.h>
 
@@ -394,14 +394,8 @@
                                        return;
                                }
 
-                               if (EG(ze1_compatibility_mode)) {
-                                       HashTable *ht = Z_OBJPROP_P(op);
-                                       if (ht) {
-                                               retval = 
(zend_hash_num_elements(ht)?1:0);
-                                       }
-                               } else {
-                                       zend_error(E_NOTICE, "Object of class 
%v could not be converted to int", Z_OBJCE_P(op)->name);
-                               }
+                               zend_error(E_NOTICE, "Object of class %v could 
not be converted to int", Z_OBJCE_P(op)->name);
+
                                zval_dtor(op);
                                ZVAL_LONG(op, retval);
                                return;
@@ -469,14 +463,7 @@
                                        return;
                                }
 
-                               if (EG(ze1_compatibility_mode)) {
-                                       HashTable *ht = Z_OBJPROP_P(op);
-                                       if (ht) {
-                                               retval = 
(zend_hash_num_elements(ht)?1.0:0.0);
-                                       }
-                               } else {
-                                       zend_error(E_NOTICE, "Object of class 
%v could not be converted to double", Z_OBJCE_P(op)->name);
-                               }
+                               zend_error(E_NOTICE, "Object of class %v could 
not be converted to double", Z_OBJCE_P(op)->name);
 
                                zval_dtor(op);
                                ZVAL_DOUBLE(op, retval);
@@ -579,13 +566,6 @@
                                        return;
                                }
 
-                               if (EG(ze1_compatibility_mode)) {
-                                       HashTable *ht = Z_OBJPROP_P(op);
-                                       if (ht) {
-                                               retval = 
(zend_hash_num_elements(ht)?1:0);
-                                       }
-                               }
-
                                zval_dtor(op);
                                ZVAL_BOOL(op, retval);
                                break;
@@ -1708,15 +1688,7 @@
                        break;
                case IS_OBJECT:
                        if (Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2)) {
-                               if (EG(ze1_compatibility_mode)) {
-                                       zend_compare_objects(result, op1, op2 
TSRMLS_CC);
-                                       /* comparison returns 0 in case of 
equality and
-                                        * 1 in case of ineqaulity, we need to 
reverse it
-                                        */
-                                       Z_LVAL_P(result) = !Z_LVAL_P(result);
-                               } else {
-                                       Z_LVAL_P(result) = (Z_OBJ_HANDLE_P(op1) 
== Z_OBJ_HANDLE_P(op2));
-                               }
+                               Z_LVAL_P(result) = (Z_OBJ_HANDLE_P(op1) == 
Z_OBJ_HANDLE_P(op2));
                        } else {
                                Z_LVAL_P(result) = 0;
                        }
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_vm_def.h?r1=1.105&r2=1.106&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.105 ZendEngine2/zend_vm_def.h:1.106
--- ZendEngine2/zend_vm_def.h:1.105     Wed Mar 15 11:15:20 2006
+++ ZendEngine2/zend_vm_def.h   Thu Mar 16 10:33:23 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_vm_def.h,v 1.105 2006/03/15 11:15:20 dmitry Exp $ */
+/* $Id: zend_vm_def.h,v 1.106 2006/03/16 10:33:23 dmitry Exp $ */
 
 /* If you change this file, please regenerate the zend_vm_execute.h and
  * zend_vm_opcodes.h files by running:
@@ -2075,25 +2075,7 @@
 
                retval_ptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == 
IS_OBJECT) {
-                       zval *ret;
-                       zstr class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       ALLOC_ZVAL(ret);
-                       INIT_PZVAL_COPY(ret, retval_ptr);
-                       dup = zend_get_object_classname(retval_ptr, 
&class_name, &class_name_len TSRMLS_CC);
-                       if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
-                               zend_error_noreturn(E_ERROR, "Trying to clone 
an uncloneable object of class %v",  class_name);
-                       }
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%v' because of 'zend.ze1_compatibility_mode'", class_name);
-                       Z_OBJVAL_P(ret) = 
Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
-                       *EG(return_value_ptr_ptr) = ret;
-                       if (!dup) {
-                               efree(class_name.v);
-                       }
-               } else if (!IS_OP1_TMP_FREE()) { /* Not a temp var */
+               if (!IS_OP1_TMP_FREE()) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == 
ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 
0)) {
                                zval *ret;
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_vm_execute.h?r1=1.109&r2=1.110&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.109 ZendEngine2/zend_vm_execute.h:1.110
--- ZendEngine2/zend_vm_execute.h:1.109 Wed Mar 15 11:15:20 2006
+++ ZendEngine2/zend_vm_execute.h       Thu Mar 16 10:33:23 2006
@@ -1652,25 +1652,7 @@
 
                retval_ptr = &opline->op1.u.constant;
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == 
IS_OBJECT) {
-                       zval *ret;
-                       zstr class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       ALLOC_ZVAL(ret);
-                       INIT_PZVAL_COPY(ret, retval_ptr);
-                       dup = zend_get_object_classname(retval_ptr, 
&class_name, &class_name_len TSRMLS_CC);
-                       if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
-                               zend_error_noreturn(E_ERROR, "Trying to clone 
an uncloneable object of class %v",  class_name);
-                       }
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%v' because of 'zend.ze1_compatibility_mode'", class_name);
-                       Z_OBJVAL_P(ret) = 
Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
-                       *EG(return_value_ptr_ptr) = ret;
-                       if (!dup) {
-                               efree(class_name.v);
-                       }
-               } else if (!0) { /* Not a temp var */
+               if (!0) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == 
ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 
0)) {
                                zval *ret;
@@ -4145,25 +4127,7 @@
 
                retval_ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 
TSRMLS_CC);
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == 
IS_OBJECT) {
-                       zval *ret;
-                       zstr class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       ALLOC_ZVAL(ret);
-                       INIT_PZVAL_COPY(ret, retval_ptr);
-                       dup = zend_get_object_classname(retval_ptr, 
&class_name, &class_name_len TSRMLS_CC);
-                       if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
-                               zend_error_noreturn(E_ERROR, "Trying to clone 
an uncloneable object of class %v",  class_name);
-                       }
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%v' because of 'zend.ze1_compatibility_mode'", class_name);
-                       Z_OBJVAL_P(ret) = 
Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
-                       *EG(return_value_ptr_ptr) = ret;
-                       if (!dup) {
-                               efree(class_name.v);
-                       }
-               } else if (!1) { /* Not a temp var */
+               if (!1) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == 
ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 
0)) {
                                zval *ret;
@@ -7145,25 +7109,7 @@
 
                retval_ptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 
TSRMLS_CC);
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == 
IS_OBJECT) {
-                       zval *ret;
-                       zstr class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       ALLOC_ZVAL(ret);
-                       INIT_PZVAL_COPY(ret, retval_ptr);
-                       dup = zend_get_object_classname(retval_ptr, 
&class_name, &class_name_len TSRMLS_CC);
-                       if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
-                               zend_error_noreturn(E_ERROR, "Trying to clone 
an uncloneable object of class %v",  class_name);
-                       }
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%v' because of 'zend.ze1_compatibility_mode'", class_name);
-                       Z_OBJVAL_P(ret) = 
Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
-                       *EG(return_value_ptr_ptr) = ret;
-                       if (!dup) {
-                               efree(class_name.v);
-                       }
-               } else if (!0) { /* Not a temp var */
+               if (!0) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == 
ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 
0)) {
                                zval *ret;
@@ -19787,25 +19733,7 @@
 
                retval_ptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R 
TSRMLS_CC);
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == 
IS_OBJECT) {
-                       zval *ret;
-                       zstr class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       ALLOC_ZVAL(ret);
-                       INIT_PZVAL_COPY(ret, retval_ptr);
-                       dup = zend_get_object_classname(retval_ptr, 
&class_name, &class_name_len TSRMLS_CC);
-                       if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
-                               zend_error_noreturn(E_ERROR, "Trying to clone 
an uncloneable object of class %v",  class_name);
-                       }
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%v' because of 'zend.ze1_compatibility_mode'", class_name);
-                       Z_OBJVAL_P(ret) = 
Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
-                       *EG(return_value_ptr_ptr) = ret;
-                       if (!dup) {
-                               efree(class_name.v);
-                       }
-               } else if (!0) { /* Not a temp var */
+               if (!0) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == 
ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 
0)) {
                                zval *ret;
http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/php_dom.c?r1=1.89&r2=1.90&diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.89 php-src/ext/dom/php_dom.c:1.90
--- php-src/ext/dom/php_dom.c:1.89      Tue Feb 21 20:12:42 2006
+++ php-src/ext/dom/php_dom.c   Thu Mar 16 10:33:23 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_dom.c,v 1.89 2006/02/21 20:12:42 dmitry Exp $ */
+/* $Id: php_dom.c,v 1.90 2006/03/16 10:33:23 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -69,7 +69,6 @@
 zend_class_entry *dom_namespace_node_class_entry;
 
 zend_object_handlers dom_object_handlers;
-zend_object_handlers dom_ze1_object_handlers;
 
 static HashTable classes;
 static HashTable u_classes;
@@ -467,24 +466,13 @@
        return retval;
 }
 
-zend_object_value dom_objects_ze1_clone_obj(zval *zobject TSRMLS_DC)
-{
-       php_error(E_ERROR, "Cannot clone object of class %v due to 
'zend.ze1_compatibility_mode'", Z_OBJCE_P(zobject)->name);
-       /* Return zobject->value.obj just to satisfy compiler */
-       return zobject->value.obj;
-}
-
 static zend_function_entry dom_functions[] = {
        PHP_FE(dom_import_simplexml, NULL)
        {NULL, NULL, NULL}
 };
 
 static zend_object_handlers* dom_get_obj_handlers(TSRMLS_D) {
-       if (EG(ze1_compatibility_mode)) {
-               return &dom_ze1_object_handlers;
-       } else {
-               return &dom_object_handlers;
-       }
+       return &dom_object_handlers;
 }
 
 static zend_module_dep dom_deps[] = {
@@ -562,13 +550,6 @@
        dom_object_handlers.clone_obj = dom_objects_store_clone_obj;
        dom_object_handlers.has_property = dom_property_exists;
 
-       memcpy(&dom_ze1_object_handlers, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
-       dom_ze1_object_handlers.read_property = dom_read_property;
-       dom_ze1_object_handlers.write_property = dom_write_property;
-       dom_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr;
-       dom_ze1_object_handlers.clone_obj = dom_objects_ze1_clone_obj;
-       dom_ze1_object_handlers.has_property = dom_property_exists;
-
        zend_hash_init(&classes, 0, NULL, (void (*)(void 
*))dom_prop_handlers_dtor, 1);
 
        INIT_CLASS_ENTRY(ce, "DOMException", 
php_dom_domexception_class_functions);
http://cvs.php.net/viewcvs.cgi/php-src/ext/simplexml/simplexml.c?r1=1.200&r2=1.201&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.200 
php-src/ext/simplexml/simplexml.c:1.201
--- php-src/ext/simplexml/simplexml.c:1.200     Mon Mar  6 20:16:03 2006
+++ php-src/ext/simplexml/simplexml.c   Thu Mar 16 10:33:23 2006
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: simplexml.c,v 1.200 2006/03/06 20:16:03 rrichards Exp $ */
+/* $Id: simplexml.c,v 1.201 2006/03/16 10:33:23 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1688,38 +1688,6 @@
        sxe_count_elements
 };
 
-static zend_object_handlers sxe_ze1_object_handlers = {
-       ZEND_OBJECTS_STORE_HANDLERS,
-       sxe_property_read,
-       sxe_property_write,
-       sxe_dimension_read,
-       sxe_dimension_write,
-       sxe_property_get_adr,
-       sxe_get_value,                  /* get */
-       NULL,
-       sxe_property_exists,
-       sxe_property_delete,
-       sxe_dimension_exists,
-       sxe_dimension_delete,
-       sxe_properties_get,
-       NULL, /* zend_get_std_object_handlers()->get_method,*/
-       NULL, /* zend_get_std_object_handlers()->call_method,*/
-       NULL, /* zend_get_std_object_handlers()->get_constructor, */
-       NULL, /* zend_get_std_object_handlers()->get_class_entry,*/
-       NULL, /* zend_get_std_object_handlers()->get_class_name,*/
-       sxe_objects_compare,
-       sxe_object_cast,
-       sxe_count_elements
-};
-
-static zend_object_value sxe_object_ze1_clone(zval *zobject TSRMLS_DC)
-{
-       php_error(E_ERROR, "Cannot clone object of class %v due to 
'zend.ze1_compatibility_mode'", Z_OBJCE_P(zobject)->name);
-       /* Return zobject->value.obj just to satisfy compiler */
-       /* FIXME: Should not be a fatal */
-       return zobject->value.obj;
-}
-
 /* {{{ sxe_object_clone()
  */
 static void
@@ -1830,11 +1798,7 @@
        zend_object_value rv;
 
        rv.handle = zend_objects_store_put(intern, sxe_object_dtor, 
(zend_objects_free_object_storage_t)sxe_object_free_storage, sxe_object_clone 
TSRMLS_CC);
-       if (EG(ze1_compatibility_mode)) {
-               rv.handlers = (zend_object_handlers *) &sxe_ze1_object_handlers;
-       } else {
-               rv.handlers = (zend_object_handlers *) &sxe_object_handlers;
-       }
+       rv.handlers = (zend_object_handlers *) &sxe_object_handlers;
 
        return rv;
 }
@@ -2271,12 +2235,6 @@
        sxe_object_handlers.get_class_entry = 
zend_get_std_object_handlers()->get_class_entry;
        sxe_object_handlers.get_class_name = 
zend_get_std_object_handlers()->get_class_name;
 
-       sxe_ze1_object_handlers.get_method = 
zend_get_std_object_handlers()->get_method;
-       sxe_ze1_object_handlers.get_constructor = 
zend_get_std_object_handlers()->get_constructor;
-       sxe_ze1_object_handlers.get_class_entry = 
zend_get_std_object_handlers()->get_class_entry;
-       sxe_ze1_object_handlers.get_class_name = 
zend_get_std_object_handlers()->get_class_name;
-       sxe_ze1_object_handlers.clone_obj = sxe_object_ze1_clone;
-
 #ifdef HAVE_SPL
        if (zend_get_module_started("spl") == SUCCESS) {
                PHP_MINIT(spl_sxe)(INIT_FUNC_ARGS_PASSTHRU);
@@ -2303,7 +2261,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "Simplexml support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.200 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.201 $");
        php_info_print_table_row(2, "Schema support",
 #ifdef LIBXML_SCHEMAS_ENABLED
                "enabled");
http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.675&r2=1.676&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.675 php-src/main/main.c:1.676
--- php-src/main/main.c:1.675   Thu Mar 16 09:44:41 2006
+++ php-src/main/main.c Thu Mar 16 10:33:23 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.675 2006/03/16 09:44:41 dmitry Exp $ */
+/* $Id: main.c,v 1.676 2006/03/16 10:33:23 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -1578,6 +1578,7 @@
                        "magic_quotes_gpc",
                        "magic_quotes_runtime",
                        "magic_quotes_sybase",
+                       "zend.ze1_compatibility_mode",
                        NULL};
                const char **p = directives;
                long val;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to