mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: minor fixes
This commit is contained in:
@ -137,21 +137,6 @@ pub fn get_error_msg(code int) string {
|
||||
return posix_get_error_msg(code)
|
||||
}
|
||||
|
||||
// convert any value to []byte (LittleEndian) and write it
|
||||
// for example if we have write(7, 4), "07 00 00 00" gets written
|
||||
// write(0x1234, 2) => "34 12"
|
||||
pub fn (mut f File) write_bytes(data voidptr, size int) {
|
||||
/*
|
||||
$if linux {
|
||||
$if !android {
|
||||
C.syscall(sys_write, f.fd, data, 1)
|
||||
return
|
||||
}
|
||||
}
|
||||
*/
|
||||
C.fwrite(data, 1, size, f.cfile)
|
||||
}
|
||||
|
||||
pub fn (mut f File) close() {
|
||||
if !f.opened {
|
||||
return
|
||||
|
Reference in New Issue
Block a user