zval *handle = NULL;
zval *zdata = NULL;
int error;
+ zend_fcall_info fci;
MAKE_STD_ZVAL(handle);
ZVAL_RESOURCE(handle, ch->id);
ZVAL_STRINGL(zdata, data, length, 1);
argv[1] = &zdata;
- error = fast_call_user_function(EG(function_table), NULL, t->func_name, &retval_ptr, 2, argv, 0, NULL, &t->func_ptr TSRMLS_CC);
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+ fci.object_pp = NULL;
+ fci.function_name = t->func_name;
+ fci.retval_ptr_ptr = &retval_ptr;
+ fci.param_count = 2;
+ fci.params = argv;
+ fci.no_separation = 0;
+ fci.symbol_table = NULL;
+
+ error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC);
if (error == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not call the CURLOPT_WRITEFUNCTION");
length = -1;
zval *retval_ptr;
int length;
int error;
+ zend_fcall_info fci;
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
MAKE_STD_ZVAL(handle);
argv[1] = &zfd;
argv[2] = &zlength;
- error = fast_call_user_function(EG(function_table), NULL, t->func_name, &retval_ptr, 3, argv, 0, NULL, &t->func_ptr TSRMLS_CC);
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+ fci.function_name = t->func_name;
+ fci.object_pp = NULL;
+ fci.retval_ptr_ptr = &retval_ptr;
+ fci.param_count = 3;
+ fci.params = argv;
+ fci.no_separation = 0;
+ fci.symbol_table = NULL;
+
+ error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC);
if (error == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION");
length = -1;
zval *zdata = NULL;
zval *retval_ptr;
int error;
+ zend_fcall_info fci;
MAKE_STD_ZVAL(handle);
MAKE_STD_ZVAL(zdata);
argv[0] = &handle;
argv[1] = &zdata;
-
- error = fast_call_user_function(EG(function_table), NULL, t->func_name, &retval_ptr, 2, argv, 0, NULL, &t->func_ptr TSRMLS_CC);
+
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+ fci.function_name = t->func_name;
+ fci.symbol_table = NULL;
+ fci.object_pp = NULL;
+ fci.retval_ptr_ptr = &retval_ptr;
+ fci.param_count = 2;
+ fci.params = argv;
+ fci.no_separation = 0;
+
+ error = zend_call_user_function(&fci, &t->fci_cache TSRMLS_CC);
if (error == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not call the CURLOPT_HEADERFUNCTION");
length = -1;
case CURLOPT_WRITEFUNCTION:
if (ch->handlers->write->func_name) {
zval_ptr_dtor(&ch->handlers->write->func_name);
- ch->handlers->write->func_ptr = NULL;
+ ch->handlers->write->fci_cache = empty_fcall_info_cache;
}
zval_add_ref(zvalue);
ch->handlers->write->func_name = *zvalue;
case CURLOPT_READFUNCTION:
if (ch->handlers->read->func_name) {
zval_ptr_dtor(&ch->handlers->read->func_name);
- ch->handlers->write->func_ptr = NULL;
+ ch->handlers->write->fci_cache = empty_fcall_info_cache;
}
zval_add_ref(zvalue);
ch->handlers->read->func_name = *zvalue;
case CURLOPT_HEADERFUNCTION:
if (ch->handlers->write_header->func_name) {
zval_ptr_dtor(&ch->handlers->write_header->func_name);
- ch->handlers->write->func_ptr = NULL;
+ ch->handlers->write->fci_cache = empty_fcall_info_cache;
}
zval_add_ref(zvalue);
ch->handlers->write_header->func_name = *zvalue;
Bucket *s;
zval **args[2];
zval *retval_ptr;
+ zend_fcall_info fci;
f = *((Bucket **) a);
s = *((Bucket **) b);
args[0] = (zval **) f->pData;
args[1] = (zval **) s->pData;
- if (fast_call_user_function(EG(function_table), NULL, *BG(user_compare_func_name), &retval_ptr, 2, args, 0, NULL, &BG(user_compare_func_ptr) TSRMLS_CC)== SUCCESS
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+ fci.function_name = *BG(user_compare_func_name);
+ fci.symbol_table = NULL;
+ fci.object_pp = NULL;
+ fci.retval_ptr_ptr = &retval_ptr;
+ fci.param_count = 2;
+ fci.params = args;
+ fci.no_separation = 0;
+
+ if (zend_call_function(&fci, &BG(user_compare_fci_cache) TSRMLS_CC)== SUCCESS
&& retval_ptr) {
long retval;
HashTable *target_hash;
old_compare_func = BG(user_compare_func_name);
- BG(user_compare_func_ptr) = NULL;
+ BG(user_compare_fci_cache) = empty_fcall_info_cache;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
BG(user_compare_func_name) = old_compare_func;
HashTable *target_hash;
old_compare_func = BG(user_compare_func_name);
- BG(user_compare_func_ptr) = NULL;
+ BG(user_compare_fci_cache) = empty_fcall_info_cache;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
BG(user_compare_func_name) = old_compare_func;
WRONG_PARAM_COUNT;
}
php_array_walk(thash, userdata, recursive TSRMLS_CC);
} else {
+ zend_fcall_info fci;
+
/* Allocate space for key */
MAKE_STD_ZVAL(key);
} else {
ZVAL_STRINGL(key, string_key, string_key_len-1, 1);
}
-
+
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+ fci.function_name = *BG(array_walk_func_name);
+ fci.symbol_table = NULL;
+ fci.object_pp = NULL;
+ fci.retval_ptr_ptr = &retval_ptr;
+ fci.param_count = userdata ? 3 : 2;
+ fci.params = args;
+ fci.no_separation = 0;
+
/* Call the userland function */
- if (fast_call_user_function(EG(function_table), NULL, *BG(array_walk_func_name),
- &retval_ptr, userdata ? 3 : 2, args, 0, NULL, &BG(array_walk_func_ptr) TSRMLS_CC) == SUCCESS) {
-
+ if (zend_call_function(&fci, &BG(array_walk_fci_cache) TSRMLS_CC) == SUCCESS) {
zval_ptr_dtor(&retval_ptr);
} else {
char *func_name;
HashTable *target_hash;
argc = ZEND_NUM_ARGS();
- BG(array_walk_func_ptr) = NULL;
+ BG(array_walk_fci_cache) = empty_fcall_info_cache;
old_walk_func_name = BG(array_walk_func_name);
if (argc < 2 || argc > 3 ||
zend_get_parameters_ex(argc, &array, &BG(array_walk_func_name), &userdata) == FAILURE) {
zval **operand;
zval *result = NULL;
zval *retval;
- zend_function *func_ptr = NULL;
+ zend_fcall_info_cache fci_cache = empty_fcall_info_cache;
char *callback_name;
HashPosition pos;
HashTable *htbl;
zend_hash_internal_pointer_reset_ex(htbl, &pos);
while (zend_hash_get_current_data_ex(htbl, (void **)&operand, &pos) == SUCCESS) {
if (result) {
+ zend_fcall_info fci;
+
args[0] = &result;
args[1] = operand;
- if (fast_call_user_function(EG(function_table), NULL, *callback, &retval, 2, args, 0, NULL, &func_ptr TSRMLS_CC) == SUCCESS && retval) {
+
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+ fci.function_name = *callback;
+ fci.symbol_table = NULL;
+ fci.object_pp = NULL;
+ fci.retval_ptr_ptr = &retval;
+ fci.param_count = 2;
+ fci.params = args;
+ fci.no_separation = 0;
+
+ if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && retval) {
zval_ptr_dtor(&result);
result = retval;
} else {
zval *retval = NULL;
char *callback_name;
char *string_key;
- zend_function *func_ptr = NULL;
+ zend_fcall_info_cache fci_cache = empty_fcall_info_cache;
uint string_key_len;
ulong num_key;
HashPosition pos;
zend_hash_move_forward_ex(Z_ARRVAL_PP(input), &pos)) {
if (callback) {
+ zend_fcall_info fci;
+
args[0] = operand;
- if (fast_call_user_function(EG(function_table), NULL, *callback, &retval, 1, args, 0, NULL, &func_ptr TSRMLS_CC) == SUCCESS && retval) {
+
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+ fci.function_name = *callback;
+ fci.symbol_table = NULL;
+ fci.object_pp = NULL;
+ fci.retval_ptr_ptr = &retval;
+ fci.param_count = 1;
+ fci.params = args;
+ fci.no_separation = 0;
+
+ if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && retval) {
if (!zend_is_true(retval)) {
zval_ptr_dtor(&retval);
continue;
HashPosition *array_pos;
zval **args;
char *callback_name;
- zend_function *func_ptr = NULL;
+ zend_fcall_info_cache fci_cache = empty_fcall_info_cache;
int i, k, maxlen = 0;
int *array_len;
}
if (Z_TYPE_P(callback) != IS_NULL) {
- if (!fast_call_user_function(EG(function_table), NULL, callback, &result, ZEND_NUM_ARGS() - 1, ¶ms[1], 0, NULL, &func_ptr TSRMLS_CC) == SUCCESS && result) {
+ zend_fcall_info fci;
+
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+ fci.function_name = callback;
+ fci.symbol_table = NULL;
+ fci.object_pp = NULL;
+ fci.retval_ptr_ptr = &result;
+ fci.param_count = ZEND_NUM_ARGS()-1;
+ fci.params = ¶ms[1];
+ fci.no_separation = 0;
+
+ if (!zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && result) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while invoking the map callback");
efree(array_len);
efree(args);