1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builtin: fix byte deprecation warnings for v test-all (the -freestanding compilation)

This commit is contained in:
Delyan Angelov
2023-05-29 13:20:29 +03:00
parent 2904c399b5
commit d47c722c1f
2 changed files with 12 additions and 12 deletions

View File

@ -116,28 +116,28 @@ fn __free(ptr &C.void) {
}
}
fn vsprintf(str &char, format &char, ap &byte) int {
fn vsprintf(str &char, format &char, ap &u8) int {
panic('vsprintf(): string interpolation is not supported in `-freestanding`')
}
fn vsnprintf(str &char, size usize, format &char, ap &byte) int {
fn vsnprintf(str &char, size usize, format &char, ap &u8) int {
panic('vsnprintf(): string interpolation is not supported in `-freestanding`')
}
// not really needed
fn bare_read(buf &byte, count u64) (i64, Errno) {
fn bare_read(buf &u8, count u64) (i64, Errno) {
return sys_read(0, buf, count)
}
pub fn bare_print(buf &byte, len u64) {
pub fn bare_print(buf &u8, len u64) {
sys_write(1, buf, len)
}
fn bare_eprint(buf &byte, len u64) {
fn bare_eprint(buf &u8, len u64) {
sys_write(2, buf, len)
}
pub fn write(fd i64, buf &byte, count u64) i64 {
pub fn write(fd i64, buf &u8, count u64) i64 {
x, _ := sys_write(fd, buf, count)
return x
}