mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: remove hardcoded check for function calls for C.stat
, C.sigaction
, etc (#18535)
This commit is contained in:
@@ -558,7 +558,7 @@ pub fn get_raw_line() string {
|
||||
mut offset := 0
|
||||
for {
|
||||
pos := buf + offset
|
||||
res := C.ReadFile(h_input, pos, 1, C.LPDWORD(&bytes_read), 0)
|
||||
res := C.ReadFile(h_input, pos, 1, &u32(&bytes_read), 0)
|
||||
if !res && offset == 0 {
|
||||
return tos(buf, 0)
|
||||
}
|
||||
@@ -600,7 +600,7 @@ pub fn get_raw_stdin() []u8 {
|
||||
mut offset := 0
|
||||
for {
|
||||
pos := buf + offset
|
||||
res := C.ReadFile(h_input, pos, block_bytes, C.LPDWORD(&bytes_read), 0)
|
||||
res := C.ReadFile(h_input, pos, block_bytes, &u32(&bytes_read), 0)
|
||||
offset += bytes_read
|
||||
if !res {
|
||||
break
|
||||
|
@@ -449,7 +449,7 @@ pub type VectoredExceptionHandler = fn (&ExceptionPointers) u32
|
||||
// duplicate definitions from displeasing the compiler
|
||||
// fn C.AddVectoredExceptionHandler(u32, VectoredExceptionHandler)
|
||||
pub fn add_vectored_exception_handler(first bool, handler VectoredExceptionHandler) {
|
||||
C.AddVectoredExceptionHandler(u32(first), C.PVECTORED_EXCEPTION_HANDLER(handler))
|
||||
C.AddVectoredExceptionHandler(u32(first), voidptr(handler))
|
||||
}
|
||||
|
||||
// uname returns information about the platform on which the program is running.
|
||||
|
Reference in New Issue
Block a user