mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: fix getline warning for linux
This commit is contained in:
parent
b8f6284daf
commit
f5fdbfd004
@ -705,7 +705,7 @@ pub fn get_raw_line() string {
|
|||||||
} $else {
|
} $else {
|
||||||
max := size_t(0)
|
max := size_t(0)
|
||||||
mut buf := byteptr(0)
|
mut buf := byteptr(0)
|
||||||
nr_chars := C.getline(&buf, &max, stdin)
|
nr_chars := C.getline(&charptr(buf), &max, stdin)
|
||||||
defer { unsafe{ free(buf) } }
|
defer { unsafe{ free(buf) } }
|
||||||
if nr_chars == 0 || nr_chars == -1 {
|
if nr_chars == 0 || nr_chars == -1 {
|
||||||
return ''
|
return ''
|
||||||
|
Loading…
Reference in New Issue
Block a user