mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-30 04:29:01 +01:00
Added a length parameter to read
This commit is contained in:
parent
7a628ff606
commit
97b329c164
7
php_uv.c
7
php_uv.c
@ -915,12 +915,13 @@ static void php_uv_fs_common(uv_fs_type fs_type, INTERNAL_FUNCTION_PARAMETERS)
|
||||
{
|
||||
zval *zstream = NULL;
|
||||
unsigned long fd;
|
||||
unsigned long length;
|
||||
|
||||
PHP_UV_FS_PARSE_PARAMETERS("zzf", &zloop, &zstream, &fci, &fcc);
|
||||
memset(uv_fs_read_buf, 0, sizeof(uv_fs_read_buf));
|
||||
PHP_UV_FS_PARSE_PARAMETERS("zzlf", &zloop, &zstream, &length, &fci, &fcc);
|
||||
memset(uv_fs_read_buf, 0, length);
|
||||
PHP_UV_FS_SETUP()
|
||||
PHP_UV_ZVAL_TO_FD(fd, zstream);
|
||||
PHP_UV_FS_ASYNC(loop, read, fd, uv_fs_read_buf, sizeof(uv_fs_read_buf), -1);
|
||||
PHP_UV_FS_ASYNC(loop, read, fd, uv_fs_read_buf, length, -1);
|
||||
break;
|
||||
}
|
||||
case UV_FS_SENDFILE:
|
||||
|
Loading…
Reference in New Issue
Block a user