mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: variable sized options
This commit is contained in:
@@ -798,12 +798,17 @@ pub fn get_raw_stdin() []byte {
|
||||
for {
|
||||
pos := buf + offset
|
||||
res := C.ReadFile(h_input, pos, block_bytes, &bytes_read, 0)
|
||||
offset += bytes_read
|
||||
|
||||
if !res {
|
||||
break
|
||||
}
|
||||
offset += bytes_read
|
||||
|
||||
buf = v_realloc(buf, offset + block_bytes + (block_bytes-bytes_read))
|
||||
}
|
||||
|
||||
C.CloseHandle(h_input)
|
||||
|
||||
return array{element_size: 1 data: voidptr(buf) len: offset cap: offset }
|
||||
}
|
||||
} $else {
|
||||
|
||||
Reference in New Issue
Block a user