- If object handles are equal then save the comparison of properties in

- the == operator.
This commit is contained in:
Andi Gutmans 2004-10-20 17:57:28 +00:00
parent f799da0a21
commit abd42847b1

View File

@ -1952,13 +1952,13 @@ ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC)
{
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;
}
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);
}