summaryrefslogtreecommitdiff
path: root/Zend/zend_object_handlers.h
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2013-06-17 17:48:13 +0200
committerNikita Popov <nikic@php.net>2013-06-17 17:48:13 +0200
commit3823321c5cef053319872ae07d726f0ef29c90b1 (patch)
treeba2cc4622cece8c38ae3db8510c047323aa3d191 /Zend/zend_object_handlers.h
parent1143f58a7094ed9a4960bfb714fa2773dda7c704 (diff)
downloadphp-git-3823321c5cef053319872ae07d726f0ef29c90b1.tar.gz
Implement internal operator overloading
As pre RFC https://wiki.php.net/rfc/operator_overloading_gmp
Diffstat (limited to 'Zend/zend_object_handlers.h')
-rw-r--r--Zend/zend_object_handlers.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index 3ea6008350..07428737ff 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -100,6 +100,7 @@ typedef zend_object_value (*zend_object_clone_obj_t)(zval *object TSRMLS_DC);
typedef zend_class_entry *(*zend_object_get_class_entry_t)(const zval *object TSRMLS_DC);
typedef int (*zend_object_get_class_name_t)(const zval *object, const char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC);
typedef int (*zend_object_compare_t)(zval *object1, zval *object2 TSRMLS_DC);
+typedef int (*zend_object_compare_zvals_t)(zval *resul, zval *op1, zval *op2 TSRMLS_DC);
/* Cast an object to some other type
*/
@@ -113,6 +114,8 @@ typedef int (*zend_object_get_closure_t)(zval *obj, zend_class_entry **ce_ptr, u
typedef HashTable *(*zend_object_get_gc_t)(zval *object, zval ***table, int *n TSRMLS_DC);
+typedef int (*zend_object_do_operation_t)(zend_uchar opcode, zval *result, zval *op1, zval *op2 TSRMLS_DC);
+
struct _zend_object_handlers {
/* general object functions */
zend_object_add_ref_t add_ref;
@@ -142,6 +145,8 @@ struct _zend_object_handlers {
zend_object_get_debug_info_t get_debug_info;
zend_object_get_closure_t get_closure;
zend_object_get_gc_t get_gc;
+ zend_object_do_operation_t do_operation;
+ zend_object_compare_zvals_t compare;
};
extern ZEND_API zend_object_handlers std_object_handlers;