cvs: ZendEngine2 / zend_operators.c
| From: | Andi Gutmans | Date: | Wed, 20 Oct 2004 17:57:29 +0000 |
| Subject: | cvs: ZendEngine2 / zend_operators.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3100@lists.php.net to get a copy of this message | ||
andi Wed Oct 20 13:57:29 2004 EDT
Modified files:
/ZendEngine2 zend_operators.c
Log:
- If object handles are equal then save the comparison of properties in
- the == operator.
http://cvs.php.net/diff.php/ZendEngine2/zend_operators.c?r1=1.197&r2=1.198&ty=u
Index: ZendEngine2/zend_operators.c
diff -u ZendEngine2/zend_operators.c:1.197 ZendEngine2/zend_operators.c:1.198
--- ZendEngine2/zend_operators.c:1.197 Thu Sep 30 14:36:03 2004
+++ ZendEngine2/zend_operators.c Wed Oct 20 13:57:28 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_operators.c,v 1.197 2004/09/30 18:36:03 andi Exp $ */
+/* $Id: zend_operators.c,v 1.198 2004/10/20 17:57:28 andi Exp $ */
#include <ctype.h>
@@ -1952,13 +1952,13 @@
{
result->type = IS_LONG;
- if (Z_OBJ_HT_P(o1)->compare_objects == NULL) {
- if (Z_OBJ_HANDLE_P(o1) == Z_OBJ_HANDLE_P(o2)) {
- result->value.lval = 0;
- } else {
- result->value.lval = 1;
- }
+ if (Z_OBJ_HANDLE_P(o1) == Z_OBJ_HANDLE_P(o2)) {
+ result->value.lval = 0;
return;
+ }
+
+ if (Z_OBJ_HT_P(o1)->compare_objects == NULL) {
+ result->value.lval = 1;
} else {
result->value.lval = Z_OBJ_HT_P(o1)->compare_objects(o1, o2 TSRMLS_CC);
}