mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-30 04:29:01 +01:00
fix uv_fs_scandir
This commit is contained in:
parent
9d6e66d516
commit
459b61462a
20
php_uv.c
20
php_uv.c
@ -1806,15 +1806,13 @@ static void php_uv_fs_cb(uv_fs_t* req)
|
|||||||
zval *dirent;
|
zval *dirent;
|
||||||
int nnames, i = 0;
|
int nnames, i = 0;
|
||||||
char *namebuf = (char *)req->ptr;
|
char *namebuf = (char *)req->ptr;
|
||||||
|
uv_dirent_t dent;
|
||||||
|
|
||||||
MAKE_STD_ZVAL(dirent);
|
MAKE_STD_ZVAL(dirent);
|
||||||
array_init(dirent);
|
array_init(dirent);
|
||||||
|
while (UV_EOF != uv_fs_scandir_next(req, &dent)) {
|
||||||
nnames = req->result;
|
add_next_index_string(dirent, dent.name, 1);
|
||||||
for (i = 0; i < nnames; i++) {
|
}
|
||||||
add_next_index_string(dirent, namebuf, 1);
|
|
||||||
namebuf += strlen(namebuf) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
params[1] = &dirent;
|
params[1] = &dirent;
|
||||||
break;
|
break;
|
||||||
@ -2924,6 +2922,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_uv_fs_readdir, 0, 0, 4)
|
|||||||
ZEND_ARG_INFO(0, callback)
|
ZEND_ARG_INFO(0, callback)
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_uv_fs_scandir, 0, 0, 4)
|
||||||
|
ZEND_ARG_INFO(0, loop)
|
||||||
|
ZEND_ARG_INFO(0, path)
|
||||||
|
ZEND_ARG_INFO(0, flags)
|
||||||
|
ZEND_ARG_INFO(0, callback)
|
||||||
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_uv_fs_fstat, 0, 0, 3)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_uv_fs_fstat, 0, 0, 3)
|
||||||
ZEND_ARG_INFO(0, loop)
|
ZEND_ARG_INFO(0, loop)
|
||||||
ZEND_ARG_INFO(0, fd)
|
ZEND_ARG_INFO(0, fd)
|
||||||
@ -6556,6 +6561,7 @@ static zend_function_entry uv_functions[] = {
|
|||||||
PHP_FE(uv_fs_lstat, arginfo_uv_fs_lstat)
|
PHP_FE(uv_fs_lstat, arginfo_uv_fs_lstat)
|
||||||
PHP_FE(uv_fs_fstat, arginfo_uv_fs_fstat)
|
PHP_FE(uv_fs_fstat, arginfo_uv_fs_fstat)
|
||||||
PHP_FE(uv_fs_readdir, arginfo_uv_fs_readdir)
|
PHP_FE(uv_fs_readdir, arginfo_uv_fs_readdir)
|
||||||
|
PHP_FE(uv_fs_scandir, arginfo_uv_fs_scandir)
|
||||||
PHP_FE(uv_fs_sendfile, arginfo_uv_fs_sendfile)
|
PHP_FE(uv_fs_sendfile, arginfo_uv_fs_sendfile)
|
||||||
PHP_FE(uv_fs_event_init, arginfo_uv_fs_event_init)
|
PHP_FE(uv_fs_event_init, arginfo_uv_fs_event_init)
|
||||||
/* tty */
|
/* tty */
|
||||||
|
Loading…
Reference in New Issue
Block a user