summaryrefslogtreecommitdiff
path: root/Zend/zend_closures.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_closures.c')
-rw-r--r--Zend/zend_closures.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index c10c1a4327..63cf7d7935 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -61,7 +61,7 @@ ZEND_METHOD(Closure, __invoke) /* {{{ */
efree(arguments);
/* destruct the function also, then - we have allocated it in get_method */
- STR_RELEASE(func->internal_function.function_name);
+ zend_string_release(func->internal_function.function_name);
efree(func);
}
/* }}} */
@@ -96,10 +96,10 @@ ZEND_METHOD(Closure, bind)
ce = closure->func.common.scope;
} else if ((ce = zend_lookup_class_ex(class_name, NULL, 1 TSRMLS_CC)) == NULL) {
zend_error(E_WARNING, "Class '%s' not found", class_name->val);
- STR_RELEASE(class_name);
+ zend_string_release(class_name);
RETURN_NULL();
}
- STR_RELEASE(class_name);
+ zend_string_release(class_name);
}
} else { /* scope argument not given; do not change the scope by default */
ce = closure->func.common.scope;
@@ -133,7 +133,7 @@ ZEND_API zend_function *zend_get_closure_invoke_method(zend_object *object TSRML
invoke->internal_function.handler = ZEND_MN(Closure___invoke);
invoke->internal_function.module = 0;
invoke->internal_function.scope = zend_ce_closure;
- invoke->internal_function.function_name = STR_INIT(ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1, 0);
+ invoke->internal_function.function_name = zend_string_init(ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1, 0);
return invoke;
}
/* }}} */
@@ -156,15 +156,15 @@ static zend_function *zend_closure_get_method(zend_object **object, zend_string
{
zend_string *lc_name;
- lc_name = STR_ALLOC(method->len, 0);
+ lc_name = zend_string_alloc(method->len, 0);
zend_str_tolower_copy(lc_name->val, method->val, method->len);
if ((method->len == sizeof(ZEND_INVOKE_FUNC_NAME)-1) &&
memcmp(lc_name->val, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0
) {
- STR_FREE(lc_name);
+ zend_string_free(lc_name);
return zend_get_closure_invoke_method(*object TSRMLS_CC);
}
- STR_FREE(lc_name);
+ zend_string_free(lc_name);
return std_object_handlers.get_method(object, method, key TSRMLS_CC);
}
/* }}} */
@@ -326,7 +326,7 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp TSRMLS_
}
ZVAL_STR(&info, zend_strpprintf(0, "%s", i >= required ? "<optional>" : "<required>"));
zend_hash_update(Z_ARRVAL(val), name, &info);
- STR_RELEASE(name);
+ zend_string_release(name);
arg_info++;
}
zend_hash_str_update(closure->debug_info, "parameter", sizeof("parameter")-1, &val);