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

all: ~500 more byte=>u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 18:25:45 +03:00
parent ae6a25f44e
commit fbb9e65c0f
148 changed files with 544 additions and 494 deletions

View File

@ -58,7 +58,7 @@ pub fn dial_udp(raddr string) ?&UdpConn {
// }
// }
pub fn (mut c UdpConn) write_ptr(b &byte, len int) ?int {
pub fn (mut c UdpConn) write_ptr(b &u8, len int) ?int {
remote := c.sock.remote() or { return err_no_udp_remote }
return c.write_to_ptr(remote, b, len)
}
@ -71,7 +71,7 @@ pub fn (mut c UdpConn) write_string(s string) ?int {
return c.write_ptr(s.str, s.len)
}
pub fn (mut c UdpConn) write_to_ptr(addr Addr, b &byte, len int) ?int {
pub fn (mut c UdpConn) write_to_ptr(addr Addr, b &u8, len int) ?int {
res := C.sendto(c.sock.handle, b, len, 0, voidptr(&addr), addr.len())
if res >= 0 {
return res