diff options
author | Dmitry Stogov <dmitry@zend.com> | 2019-10-07 17:57:49 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2019-10-07 17:57:49 +0300 |
commit | b02b81299ccef7de244bac7ffc605e3d2943fa88 (patch) | |
tree | f07036f89b7f4c8f3162f20702881061d59a13a3 /ext/com_dotnet/com_handlers.c | |
parent | e2100619ac064fdd4e7fe79e296a2ca087409e7d (diff) | |
download | php-git-b02b81299ccef7de244bac7ffc605e3d2943fa88.tar.gz |
Comparison cleanup:
- introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval)
- remove compare_objects() object handler, and keep only compare() handler
Diffstat (limited to 'ext/com_dotnet/com_handlers.c')
-rw-r--r-- | ext/com_dotnet/com_handlers.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index 788db3768c..c9b7d898ed 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -422,6 +422,8 @@ static int com_objects_compare(zval *object1, zval *object2) * So, we have this declaration here to fix it */ STDAPI VarCmp(LPVARIANT pvarLeft, LPVARIANT pvarRight, LCID lcid, DWORD flags); + ZEND_COMPARE_OBJECTS_FALLBACK(object1, object2); + obja = CDNO_FETCH(object1); objb = CDNO_FETCH(object2); @@ -538,12 +540,14 @@ zend_object_handlers php_com_object_handlers = { com_method_get, com_constructor_get, com_class_name_get, - com_objects_compare, com_object_cast, com_object_count, NULL, /* get_debug_info */ NULL, /* get_closure */ zend_std_get_gc, /* get_gc */ + NULL, /* do_operation */ + com_objects_compare, /* compare */ + NULL, /* get_properties_for */ }; void php_com_object_enable_event_sink(php_com_dotnet_object *obj, int enable) |