p. ARG_COUNT() macro removed
q. GC_COLLECTABLE flag
r. Cannot implement Traversable only
+ s. zend_fcall_info no_separation flag removed
2. Build system changes
a. Abstract
zend_create_internal_iterator_zval(return_value, ZEND_THIS);
}
+ s. The zend_fcall_info no_separation flag has been removed, and separation is
+ never allowed. If you wish to pass (or allow passing) arguments by
+ reference, explicitly create those arguments as references using
+ ZEND_MAKE_REF.
+
========================
2. Build system changes
========================
fci->retval = NULL;
fci->param_count = 0;
fci->params = NULL;
- fci->no_separation = 1;
return SUCCESS;
}
zval *retval;
zval *params;
zend_object *object;
- zend_bool no_separation;
uint32_t param_count;
} zend_fcall_info;
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key), __value)
-ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation);
+ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[]);
#define call_user_function(_unused, object, function_name, retval_ptr, param_count, params) \
- _call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
-#define call_user_function_ex(_unused, object, function_name, retval_ptr, param_count, params, no_separation, _unused2) \
- _call_user_function_ex(object, function_name, retval_ptr, param_count, params, no_separation)
+ _call_user_function_ex(object, function_name, retval_ptr, param_count, params)
ZEND_API extern const zend_fcall_info empty_fcall_info;
ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;
fci.size = sizeof(fci);
ZVAL_OBJ(&fci.function_name, &closure->std);
fci.retval = &closure_result;
- fci.no_separation = 1;
if (zend_call_function(&fci, &fci_cache) == SUCCESS && Z_TYPE(closure_result) != IS_UNDEF) {
if (Z_ISREF(closure_result)) {
fci.retval = &trace;
fci.param_count = 0;
fci.params = NULL;
- fci.no_separation = 1;
zend_call_function(&fci, NULL);
}
/* }}} */
-int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation) /* {{{ */
+int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[]) /* {{{ */
{
zend_fcall_info fci;
fci.retval = retval_ptr;
fci.param_count = param_count;
fci.params = params;
- fci.no_separation = (zend_bool) no_separation;
return zend_call_function(&fci, NULL);
}
if (ARG_SHOULD_BE_SENT_BY_REF(func, i + 1)) {
if (UNEXPECTED(!Z_ISREF_P(arg))) {
- if (!fci->no_separation) {
- /* Separation is enabled -- create a ref */
- ZVAL_NEW_REF(arg, arg);
- } else if (!ARG_MAY_BE_SENT_BY_REF(func, i + 1)) {
+ if (!ARG_MAY_BE_SENT_BY_REF(func, i + 1)) {
/* By-value send is not allowed -- emit a warning,
* but still perform the call with a by-value send. */
zend_param_must_be_ref(func, i + 1);
fci.retval = retval_ptr ? retval_ptr : &retval;
fci.param_count = param_count;
fci.params = params;
- fci.no_separation = 1;
ZVAL_UNDEF(&fci.function_name); /* Unused */
fcic.function_handler = fn;
fci.retval = &retval;
fci.param_count = 2;
fci.params = argv;
- fci.no_separation = 1;
ch->in_callback = 1;
error = zend_call_function(&fci, &t->fci_cache);
fci.retval = &retval;
fci.param_count = 3;
fci.params = argv;
- fci.no_separation = 1;
ch->in_callback = 1;
error = zend_call_function(&fci, &t->fci_cache);
fci.retval = &retval;
fci.param_count = 5;
fci.params = argv;
- fci.no_separation = 1;
ch->in_callback = 1;
error = zend_call_function(&fci, &t->fci_cache);
fci.retval = &retval;
fci.param_count = 3;
fci.params = argv;
- fci.no_separation = 1;
ch->in_callback = 1;
error = zend_call_function(&fci, &t->fci_cache);
fci.retval = &retval;
fci.param_count = 2;
fci.params = argv;
- fci.no_separation = 1;
ch->in_callback = 1;
error = zend_call_function(&fci, &t->fci_cache);
fci.object = NULL;
fci.retval = &retval;
- fci.no_separation = 1;
if (!zend_make_callable(&fci.function_name, &callable)) {
php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", ZSTR_VAL(callable));
fci.retval = &retval;
fci.params = do_alloca(sizeof(zval) *callback_data->arg_count, use_heap);
fci.object = NULL;
- fci.no_separation = 1;
fci.param_count = callback_data->arg_count;
if (callback_data->type->func.args) {
objval->to_cb.param_count = 4;
objval->to_cb.params = zargs;
objval->to_cb.retval = &retval;
- objval->to_cb.no_separation = 1;
if (zend_call_function(&(objval->to_cb), &(objval->to_cache)) == FAILURE) {
/* Unlikely */
php_converter_throw_failure(objval, U_INTERNAL_PROGRAM_ERROR, "Unexpected failure calling toUCallback()");
objval->from_cb.param_count = 4;
objval->from_cb.params = zargs;
objval->from_cb.retval = &retval;
- objval->from_cb.no_separation = 1;
if (zend_call_function(&(objval->from_cb), &(objval->from_cache)) == FAILURE) {
/* Unlikely */
php_converter_throw_failure(objval, U_INTERNAL_PROGRAM_ERROR, "Unexpected failure calling fromUCallback()");
fci->retval = &retval;
fci->params = params;
fci->param_count = sizeof(params)/sizeof(*params);
- fci->no_separation = 1;
status = zend_call_function(fci, &LIBXML(entity_loader).fcc);
if (status != SUCCESS || Z_ISUNDEF(retval)) {
fci.retval = &retval;
fci.params = NULL;
fci.param_count = 0;
- fci.no_separation = 1;
if (ctor_params && Z_TYPE_P(ctor_params) != IS_NULL) {
if (zend_fcall_info_args(&fci, ctor_params) == FAILURE) {
fci->retval = &retval;
fci->param_count = 1;
fci->params = &arg;
- fci->no_separation = 1;
if (zend_call_function(fci, fcc) == SUCCESS && Z_TYPE(retval) != IS_UNDEF) {
if (EXPECTED(Z_TYPE(retval) == IS_STRING)) {
fci.retval = &retval;
fci.param_count = 0;
fci.params = NULL;
- fci.no_separation = 1;
zend_fcall_info_args(&fci, ctor_args);
fci->retval = &stmt->fetch.cls.retval;
fci->param_count = 0;
fci->params = NULL;
- fci->no_separation = 1;
zend_fcall_info_args_ex(fci, ce->constructor, &stmt->fetch.cls.ctor_args);
fci.retval = &retval;
fci.params = NULL;
fci.param_count = 0;
- fci.no_separation = 1;
if (ctor_params && Z_TYPE_P(ctor_params) != IS_NULL) {
if (zend_fcall_info_args(&fci, ctor_params) == FAILURE) {
fci.retval = &retval;
fci.param_count = num_args;
fci.params = params;
- fci.no_separation = 1;
fcc.function_handler = fptr;
fcc.called_scope = NULL;
fci.retval = &retval;
fci.param_count = argc;
fci.params = params;
- fci.no_separation = 1;
fcc.function_handler = fptr;
fcc.called_scope = NULL;
fci.retval = &retval;
fci.param_count = argc;
fci.params = params;
- fci.no_separation = 1;
fcc.function_handler = mptr;
fcc.called_scope = intern->ce;
fci.retval = &trace;
fci.param_count = 0;
fci.params = NULL;
- fci.no_separation = 1;
zend_call_function(&fci, NULL);
fci.retval = return_value;
fci.param_count = num_args;
fci.params = params;
- fci.no_separation = 1;
ZVAL_STR(&fci.function_name, func_ptr->common.function_name);
fcic.function_handler = func_ptr;
fci.retval = &dummy;
fci.param_count = argc;
fci.params = argv;
- fci.no_separation = 1;
fcc.function_handler = func;
fcc.called_scope = pce;
fci->retval = return_value;
fci->param_count = 3;
fci->params = params;
- fci->no_separation = 1;
if (zend_call_function(fci, fcc) != SUCCESS || Z_ISUNDEF_P(return_value)) {
RETURN_FALSE;
fci->retval = &retval;
fci->param_count = 5;
fci->params = argv;
- fci->no_separation = 1;
int authreturn = SQLITE_DENY;
BG(user_compare_fci).param_count = 2;
BG(user_compare_fci).params = args;
BG(user_compare_fci).retval = &retval;
- BG(user_compare_fci).no_separation = 1;
call_failed = zend_call_function(&BG(user_compare_fci), &BG(user_compare_fci_cache)) == FAILURE || Z_TYPE(retval) == IS_UNDEF;
zval_ptr_dtor(&args[1]);
zval_ptr_dtor(&args[0]);
BG(user_compare_fci).param_count = 2;
BG(user_compare_fci).params = args;
BG(user_compare_fci).retval = &retval;
- BG(user_compare_fci).no_separation = 1;
call_failed = zend_call_function(&BG(user_compare_fci), &BG(user_compare_fci_cache)) == FAILURE || Z_TYPE(retval) == IS_UNDEF;
zval_ptr_dtor(&args[1]);
zval_ptr_dtor(&args[0]);
BG(array_walk_fci).retval = &retval;
BG(array_walk_fci).param_count = userdata ? 3 : 2;
BG(array_walk_fci).params = args;
- BG(array_walk_fci).no_separation = 1;
zend_hash_internal_pointer_reset_ex(target_hash, &pos);
ht_iter = zend_hash_iterator_add(target_hash, pos);
BG(user_compare_fci).param_count = 2;
BG(user_compare_fci).params = args;
BG(user_compare_fci).retval = &retval;
- BG(user_compare_fci).no_separation = 1;
if (zend_call_function(&BG(user_compare_fci), &BG(user_compare_fci_cache)) == SUCCESS && Z_TYPE(retval) != IS_UNDEF) {
zend_long ret = zval_get_long(&retval);
fci.retval = &retval;
fci.param_count = 2;
- fci.no_separation = 1;
ZEND_HASH_FOREACH_VAL(htbl, operand) {
ZVAL_COPY_VALUE(&args[0], return_value);
if (ZEND_FCI_INITIALIZED(fci)) {
have_callback = 1;
- fci.no_separation = 1;
fci.retval = &retval;
if (use_type == ARRAY_FILTER_USE_BOTH) {
fci.param_count = 2;
fci.retval = &result;
fci.param_count = 1;
fci.params = &arg;
- fci.no_separation = 1;
ZVAL_COPY(&arg, zv);
ret = zend_call_function(&fci, &fci_cache);
fci.retval = &result;
fci.param_count = n_arrays;
fci.params = params;
- fci.no_separation = 1;
if (zend_call_function(&fci, &fci_cache) != SUCCESS || Z_TYPE(result) == IS_UNDEF) {
efree(array_pos);
fci.retval = retval;
fci.param_count = argc;
fci.params = argv;
- fci.no_separation = 1;
result = zend_call_function(&fci, NULL);
if (result == FAILURE) {
ZVAL_COPY_VALUE(&fci.function_name, &handler);
fci.object = NULL;
fci.retval = &retval;
- fci.no_separation = 1;
if (!zend_make_callable(&handler, &callable)) {
if (!EG(exception)) {
php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", ZSTR_VAL(callable));
fci.retval = &retval;
fci.param_count = 0;
fci.params = NULL;
- fci.no_separation = 1;
fcc.function_handler = uwrap->ce->constructor;
fcc.called_scope = Z_OBJCE_P(object);
//???fci.symbol_table = zend_rebuild_symbol_table();
fci.object = NULL;
fci.retval = &fretval;
- fci.no_separation = 1;
if (name->next) {
zval params;