mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Remove get_class_entry object handler
This commit is contained in:
parent
116c5ecda1
commit
b3a779de68
5 changed files with 3 additions and 14 deletions
|
@ -198,7 +198,7 @@ ZEND_API char *zend_zval_type_name(const zval *arg) /* {{{ */
|
|||
|
||||
ZEND_API zend_class_entry *zend_get_class_entry(const zend_object *zobject TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
return zobject->handlers->get_class_entry(zobject TSRMLS_CC);
|
||||
return zobject->ce;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ void zend_shutdown_timeout_thread(void);
|
|||
/* The following tries to resolve the classname of a zval of type object.
|
||||
* Since it is slow it should be only used in error messages.
|
||||
*/
|
||||
#define Z_OBJ_CLASS_NAME_P(obj) ((obj) ? (obj)->handlers->get_class_entry(obj TSRMLS_CC)->name->val : "")
|
||||
#define Z_OBJ_CLASS_NAME_P(obj) ((obj) ? (obj)->ce->name->val : "")
|
||||
|
||||
ZEND_API zval* zend_get_compiled_variable_value(const zend_execute_data *execute_data_ptr, uint32_t var);
|
||||
|
||||
|
|
|
@ -1089,7 +1089,7 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str
|
|||
/* Ensure that if we're calling a private function, we're allowed to do so.
|
||||
* If we're not and __call() handler exists, invoke it, otherwise error out.
|
||||
*/
|
||||
updated_fbc = zend_check_private_int(fbc, zobj->handlers->get_class_entry(zobj TSRMLS_CC), lc_method_name TSRMLS_CC);
|
||||
updated_fbc = zend_check_private_int(fbc, zobj->ce, lc_method_name TSRMLS_CC);
|
||||
if (EXPECTED(updated_fbc != NULL)) {
|
||||
fbc = updated_fbc;
|
||||
} else {
|
||||
|
@ -1525,12 +1525,6 @@ exit:
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
zend_class_entry *zend_std_object_get_class(const zend_object *object TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
return object->ce;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
zend_string* zend_std_object_get_class_name(const zend_object *zobj, int parent TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_class_entry *ce;
|
||||
|
@ -1660,7 +1654,6 @@ ZEND_API zend_object_handlers std_object_handlers = {
|
|||
zend_std_get_method, /* get_method */
|
||||
NULL, /* call_method */
|
||||
zend_std_get_constructor, /* get_constructor */
|
||||
zend_std_object_get_class, /* get_class_entry */
|
||||
zend_std_object_get_class_name, /* get_class_name */
|
||||
zend_std_compare_objects, /* compare_objects */
|
||||
zend_std_cast_object_tostring, /* cast_object */
|
||||
|
|
|
@ -95,7 +95,6 @@ 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_class_entry *(*zend_object_get_class_entry_t)(const zend_object *object TSRMLS_DC);
|
||||
typedef zend_string *(*zend_object_get_class_name_t)(const zend_object *object, 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);
|
||||
|
@ -137,7 +136,6 @@ struct _zend_object_handlers {
|
|||
zend_object_get_method_t get_method;
|
||||
zend_object_call_method_t call_method;
|
||||
zend_object_get_constructor_t get_constructor;
|
||||
zend_object_get_class_entry_t get_class_entry;
|
||||
zend_object_get_class_name_t get_class_name;
|
||||
zend_object_compare_t compare_objects;
|
||||
zend_object_cast_t cast_object;
|
||||
|
|
|
@ -1958,7 +1958,6 @@ static zend_object_handlers sxe_object_handlers = { /* {{{ */
|
|||
NULL, /* zend_get_std_object_handlers()->get_method,*/
|
||||
NULL, /* zend_get_std_object_handlers()->call_method,*/
|
||||
NULL, /* zend_get_std_object_handlers()->get_constructor, */
|
||||
NULL, /* zend_get_std_object_handlers()->get_class_entry,*/
|
||||
NULL, /* zend_get_std_object_handlers()->get_class_name,*/
|
||||
sxe_objects_compare,
|
||||
sxe_object_cast,
|
||||
|
@ -2580,7 +2579,6 @@ PHP_MINIT_FUNCTION(simplexml)
|
|||
sxe_object_handlers.clone_obj = sxe_object_clone;
|
||||
sxe_object_handlers.get_method = zend_get_std_object_handlers()->get_method;
|
||||
sxe_object_handlers.get_constructor = zend_get_std_object_handlers()->get_constructor;
|
||||
sxe_object_handlers.get_class_entry = zend_get_std_object_handlers()->get_class_entry;
|
||||
sxe_object_handlers.get_class_name = zend_get_std_object_handlers()->get_class_name;
|
||||
sxe_class_entry->serialize = zend_class_serialize_deny;
|
||||
sxe_class_entry->unserialize = zend_class_unserialize_deny;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue