Skip to content

Commit d893fd4

Browse files
committed
Remove now unused spl_filesystem_file_call()
1 parent 07fd8ce commit d893fd4

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

ext/spl/spl_directory.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,49 +1903,6 @@ static int spl_filesystem_file_read(spl_filesystem_object *intern, int silent) /
19031903
return SUCCESS;
19041904
} /* }}} */
19051905

1906-
static int spl_filesystem_file_call(spl_filesystem_object *intern, zend_function *func_ptr, int pass_num_args, zval *return_value) /* {{{ */
1907-
{
1908-
zend_fcall_info fci;
1909-
zend_fcall_info_cache fcic;
1910-
zval *zresource_ptr = &intern->u.file.zresource, *params;
1911-
int result;
1912-
int num_args = pass_num_args + 1;
1913-
1914-
if (Z_ISUNDEF_P(zresource_ptr)) {
1915-
zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Object not initialized");
1916-
return FAILURE;
1917-
}
1918-
1919-
params = (zval*)safe_emalloc(num_args, sizeof(zval), 0);
1920-
params[0] = *zresource_ptr;
1921-
1922-
if (zend_get_parameters_array_ex(pass_num_args, params + 1) != SUCCESS) {
1923-
efree(params);
1924-
WRONG_PARAM_COUNT_WITH_RETVAL(FAILURE);
1925-
}
1926-
1927-
fci.size = sizeof(fci);
1928-
fci.object = NULL;
1929-
fci.retval = return_value;
1930-
fci.param_count = num_args;
1931-
fci.params = params;
1932-
fci.named_params = NULL;
1933-
ZVAL_STR(&fci.function_name, func_ptr->common.function_name);
1934-
1935-
fcic.function_handler = func_ptr;
1936-
fcic.called_scope = NULL;
1937-
fcic.object = NULL;
1938-
1939-
result = zend_call_function(&fci, &fcic);
1940-
1941-
if (result == FAILURE || Z_ISUNDEF_P(return_value)) {
1942-
RETVAL_FALSE;
1943-
}
1944-
1945-
efree(params);
1946-
return result;
1947-
} /* }}} */
1948-
19491906
static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char delimiter, char enclosure, int escape, zval *return_value) /* {{{ */
19501907
{
19511908
int ret = SUCCESS;

0 commit comments

Comments
 (0)