1
0
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:
penguindark
2020-05-22 06:21:11 +02:00
committed by GitHub
parent edabd57e8a
commit 8bf290acf0
4 changed files with 66 additions and 68 deletions

View File

@ -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