summaryrefslogtreecommitdiff
path: root/Zend/zend_interfaces.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-06-30 13:59:27 +0300
committerDmitry Stogov <dmitry@zend.com>2015-06-30 13:59:27 +0300
commit7aa7627172c11979ec45c2db85f99182812ee59d (patch)
tree90762a1d26b47213a9edd7016a9c45110156e24e /Zend/zend_interfaces.c
parentd554d64f649a915b4ecb3a1de409cfc8ff0e9133 (diff)
downloadphp-git-7aa7627172c11979ec45c2db85f99182812ee59d.tar.gz
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
Diffstat (limited to 'Zend/zend_interfaces.c')
-rw-r--r--Zend/zend_interfaces.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index 3b4d2042f1..351b4da2ce 100644
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -78,7 +78,7 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun
if (!fn_proxy || !*fn_proxy) {
if ((fcic.function_handler = zend_hash_find_ptr(function_table, Z_STR(fci.function_name))) == NULL) {
/* error at c-level */
- zend_error_noreturn(E_CORE_ERROR, "Couldn't find implementation for method %s%s%s", obj_ce ? obj_ce->name->val : "", obj_ce ? "::" : "", function_name);
+ zend_error_noreturn(E_CORE_ERROR, "Couldn't find implementation for method %s%s%s", obj_ce ? ZSTR_VAL(obj_ce->name) : "", obj_ce ? "::" : "", function_name);
}
if (fn_proxy) {
*fn_proxy = fcic.function_handler;
@@ -110,7 +110,7 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun
obj_ce = object ? Z_OBJCE_P(object) : NULL;
}
if (!EG(exception)) {
- zend_error_noreturn(E_CORE_ERROR, "Couldn't execute method %s%s%s", obj_ce ? obj_ce->name->val : "", obj_ce ? "::" : "", function_name);
+ zend_error_noreturn(E_CORE_ERROR, "Couldn't execute method %s%s%s", obj_ce ? ZSTR_VAL(obj_ce->name) : "", obj_ce ? "::" : "", function_name);
}
}
/* copy arguments back, they might be changed by references */
@@ -216,7 +216,7 @@ ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *ke
ZVAL_ZVAL(key, &retval, 1, 1);
} else {
if (!EG(exception)) {
- zend_error(E_WARNING, "Nothing returned from %s::key()", iter->ce->name->val);
+ zend_error(E_WARNING, "Nothing returned from %s::key()", ZSTR_VAL(iter->ce->name));
}
ZVAL_LONG(key, 0);
@@ -290,7 +290,7 @@ ZEND_API zend_object_iterator *zend_user_it_get_new_iterator(zend_class_entry *c
if (!ce_it || !ce_it->get_iterator || (ce_it->get_iterator == zend_user_it_get_new_iterator && Z_OBJ(iterator) == Z_OBJ_P(object))) {
if (!EG(exception)) {
- zend_throw_exception_ex(NULL, 0, "Objects returned by %s::getIterator() must be traversable or implement interface Iterator", ce ? ce->name->val : Z_OBJCE_P(object)->name->val);
+ zend_throw_exception_ex(NULL, 0, "Objects returned by %s::getIterator() must be traversable or implement interface Iterator", ce ? ZSTR_VAL(ce->name) : ZSTR_VAL(Z_OBJCE_P(object)->name));
}
zval_ptr_dtor(&iterator);
return NULL;
@@ -317,10 +317,10 @@ static int zend_implement_traversable(zend_class_entry *interface, zend_class_en
}
}
zend_error_noreturn(E_CORE_ERROR, "Class %s must implement interface %s as part of either %s or %s",
- class_type->name->val,
- zend_ce_traversable->name->val,
- zend_ce_iterator->name->val,
- zend_ce_aggregate->name->val);
+ ZSTR_VAL(class_type->name),
+ ZSTR_VAL(zend_ce_traversable->name),
+ ZSTR_VAL(zend_ce_iterator->name),
+ ZSTR_VAL(zend_ce_aggregate->name));
return FAILURE;
}
/* }}} */
@@ -341,9 +341,9 @@ static int zend_implement_aggregate(zend_class_entry *interface, zend_class_entr
for (i = 0; i < class_type->num_interfaces; i++) {
if (class_type->interfaces[i] == zend_ce_iterator) {
zend_error_noreturn(E_ERROR, "Class %s cannot implement both %s and %s at the same time",
- class_type->name->val,
- interface->name->val,
- zend_ce_iterator->name->val);
+ ZSTR_VAL(class_type->name),
+ ZSTR_VAL(interface->name),
+ ZSTR_VAL(zend_ce_iterator->name));
return FAILURE;
}
if (class_type->interfaces[i] == zend_ce_traversable) {
@@ -373,9 +373,9 @@ static int zend_implement_iterator(zend_class_entry *interface, zend_class_entry
/* c-level get_iterator cannot be changed */
if (class_type->get_iterator == zend_user_it_get_new_iterator) {
zend_error_noreturn(E_ERROR, "Class %s cannot implement both %s and %s at the same time",
- class_type->name->val,
- interface->name->val,
- zend_ce_aggregate->name->val);
+ ZSTR_VAL(class_type->name),
+ ZSTR_VAL(interface->name),
+ ZSTR_VAL(zend_ce_aggregate->name));
}
return FAILURE;
}
@@ -440,7 +440,7 @@ ZEND_API int zend_user_serialize(zval *object, unsigned char **buffer, size_t *b
}
if (result == FAILURE && !EG(exception)) {
- zend_throw_exception_ex(NULL, 0, "%s::serialize() must return a string or NULL", ce->name->val);
+ zend_throw_exception_ex(NULL, 0, "%s::serialize() must return a string or NULL", ZSTR_VAL(ce->name));
}
return result;
}
@@ -472,14 +472,14 @@ ZEND_API int zend_user_unserialize(zval *object, zend_class_entry *ce, const uns
ZEND_API int zend_class_serialize_deny(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
- zend_throw_exception_ex(NULL, 0, "Serialization of '%s' is not allowed", ce->name->val);
+ zend_throw_exception_ex(NULL, 0, "Serialization of '%s' is not allowed", ZSTR_VAL(ce->name));
return FAILURE;
}
/* }}} */
ZEND_API int zend_class_unserialize_deny(zval *object, zend_class_entry *ce, const unsigned char *buf, size_t buf_len, zend_unserialize_data *data) /* {{{ */
{
- zend_throw_exception_ex(NULL, 0, "Unserialization of '%s' is not allowed", ce->name->val);
+ zend_throw_exception_ex(NULL, 0, "Unserialization of '%s' is not allowed", ZSTR_VAL(ce->name));
return FAILURE;
}
/* }}} */