summaryrefslogtreecommitdiff
path: root/Zend/zend_object_handlers.h
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2014-10-09 19:15:07 +0200
committerNikita Popov <nikic@php.net>2014-10-09 20:48:27 +0200
commitdf79b9b27af70afe502979c84a981d36ed9d86a8 (patch)
tree4a642d706985c960bbfeea70f195aeefe8eb4631 /Zend/zend_object_handlers.h
parentc061c8294514fb8eae7b96f77839312244a50048 (diff)
downloadphp-git-df79b9b27af70afe502979c84a981d36ed9d86a8.tar.gz
Update get_class_name semantics
* get_class_name is now only used for displaying the class name in debugging functions like var_dump, print_r, etc. It is no longer used in get_class() etc. * As it is no longer used in get_parent_class() the parent argument is now gone. This also fixes incorrect parent classes being reported in COM. * get_class_name is now always required (previously some places made it optional and some required it) and is also required to return a non-NULL value. * Remove zend_get_object_classname. This also fixes a number of potential leaks due to incorrect usage of this function.
Diffstat (limited to 'Zend/zend_object_handlers.h')
-rw-r--r--Zend/zend_object_handlers.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index 623282b43d..2b06ebdf3d 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -95,7 +95,10 @@ typedef void (*zend_object_dtor_obj_t)(zend_object *object TSRMLS_DC);
typedef void (*zend_object_free_obj_t)(zend_object *object TSRMLS_DC);
typedef zend_object* (*zend_object_clone_obj_t)(zval *object TSRMLS_DC);
-typedef zend_string *(*zend_object_get_class_name_t)(const zend_object *object, int parent TSRMLS_DC);
+/* Get class name for display in var_dump and other debugging functions.
+ * Must be defined and must return a non-NULL value. */
+typedef zend_string *(*zend_object_get_class_name_t)(const zend_object *object 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);