summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2014-10-09 14:17:30 +0200
committerNikita Popov <nikic@php.net>2014-10-09 14:17:30 +0200
commite5e9d8346f50d406f4e8ed8431b7c917663a32c3 (patch)
tree248542824dba374e9213f7f0aef9c0cbdfa9349c /Zend/zend_API.c
parentb3a779de68efcf2cff265cae30e45f1ada834064 (diff)
downloadphp-git-e5e9d8346f50d406f4e8ed8431b7c917663a32c3.tar.gz
Remove zend_get_class_entry function
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index b9e6cc1002..cf4ac5effd 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -196,12 +196,6 @@ 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->ce;
-}
-/* }}} */
-
/* returns 1 if you need to copy result, 0 if it's already a copy */
ZEND_API zend_string *zend_get_object_classname(const zend_object *object TSRMLS_DC) /* {{{ */
{
@@ -213,7 +207,7 @@ ZEND_API zend_string *zend_get_object_classname(const zend_object *object TSRMLS
return ret;
}
}
- return zend_get_class_entry(object TSRMLS_CC)->name;
+ return object->ce->name;
}
/* }}} */
@@ -2895,7 +2889,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache
fcc->object = Z_OBJ(EG(current_execute_data)->This);
fcc->called_scope = Z_OBJCE(EG(current_execute_data)->This);
} else {
- fcc->called_scope = fcc->object ? zend_get_class_entry(fcc->object TSRMLS_CC) : fcc->calling_scope;
+ fcc->called_scope = fcc->object ? fcc->object->ce : fcc->calling_scope;
}
*strict_class = 1;
ret = 1;
@@ -3038,7 +3032,7 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
((fcc->object && fcc->calling_scope->__call) ||
(!fcc->object && fcc->calling_scope->__callstatic)))) {
if (fcc->function_handler->op_array.fn_flags & ZEND_ACC_PRIVATE) {
- if (!zend_check_private(fcc->function_handler, fcc->object ? zend_get_class_entry(fcc->object TSRMLS_CC) : EG(scope), lmname TSRMLS_CC)) {
+ if (!zend_check_private(fcc->function_handler, fcc->object ? fcc->object->ce : EG(scope), lmname TSRMLS_CC)) {
retval = 0;
fcc->function_handler = NULL;
goto get_function_via_handler;
@@ -3148,7 +3142,7 @@ get_function_via_handler:
}
if (retval && (check_flags & IS_CALLABLE_CHECK_NO_ACCESS) == 0) {
if (fcc->function_handler->op_array.fn_flags & ZEND_ACC_PRIVATE) {
- if (!zend_check_private(fcc->function_handler, fcc->object ? zend_get_class_entry(fcc->object TSRMLS_CC) : EG(scope), lmname TSRMLS_CC)) {
+ if (!zend_check_private(fcc->function_handler, fcc->object ? fcc->object->ce : EG(scope), lmname TSRMLS_CC)) {
if (error) {
if (*error) {
efree(*error);
@@ -3181,7 +3175,7 @@ get_function_via_handler:
zend_string_release(mname);
if (fcc->object) {
- fcc->called_scope = zend_get_class_entry(fcc->object TSRMLS_CC);
+ fcc->called_scope = fcc->object->ce;
}
if (retval) {
fcc->initialized = 1;
@@ -3222,7 +3216,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint
case IS_STRING:
if (object) {
fcc->object = object;
- fcc->calling_scope = zend_get_class_entry(object TSRMLS_CC);
+ fcc->calling_scope = object->ce;
if (callable_name) {
char *ptr;