summaryrefslogtreecommitdiff
path: root/Zend/zend_object_handlers.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_object_handlers.h')
-rw-r--r--Zend/zend_object_handlers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index a0c2cfa8e4..4c8d12eda3 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -93,6 +93,9 @@ typedef int (*zend_object_get_class_name_t)(zval *object, char **class_name, zen
typedef int (*zend_object_compare_t)(zval *object1, zval *object2 TSRMLS_DC);
typedef int (*zend_object_cast_t)(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC);
+/* updates *count to hold the number of elements present and returns SUCCESS.
+ * Returns FAILURE if the object does not have any sense of overloaded dimensions */
+typedef int (*zend_object_count_elements_t)(zval *object, long *count TSRMLS_DC);
typedef struct _zend_object_handlers {
/* general object functions */
@@ -119,6 +122,7 @@ typedef struct _zend_object_handlers {
zend_object_get_class_name_t get_class_name;
zend_object_compare_t compare_objects;
zend_object_cast_t cast_object;
+ zend_object_count_elements_t count_elements;
} zend_object_handlers;
extern ZEND_API zend_object_handlers std_object_handlers;