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

all: byte => u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 14:58:56 +03:00
parent b49d873217
commit d4a0d6f73c
221 changed files with 1365 additions and 1365 deletions

View File

@ -62,7 +62,7 @@ fn (mut s StreamSocket) connect(a string) ? {
}
mut addr := C.sockaddr_un{}
unsafe { C.memset(&addr, 0, sizeof(C.sockaddr_un)) }
addr.sun_family = byte(C.AF_UNIX)
addr.sun_family = u8(C.AF_UNIX)
unsafe { C.strncpy(&addr.sun_path[0], &char(a.str), max_sun_path) }
size := C.SUN_LEN(&addr)
res := C.connect(s.handle, voidptr(&addr), size)
@ -94,7 +94,7 @@ pub fn listen_stream(sock string) ?&StreamListener {
s.path = sock
mut addr := C.sockaddr_un{}
unsafe { C.memset(&addr, 0, sizeof(C.sockaddr_un)) }
addr.sun_family = byte(C.AF_UNIX)
addr.sun_family = u8(C.AF_UNIX)
unsafe { C.strncpy(&addr.sun_path[0], &char(sock.str), max_sun_path) }
size := C.SUN_LEN(&addr)
if os.exists(sock) {
@ -177,7 +177,7 @@ pub fn (mut c StreamConn) write_ptr(b &byte, len int) ?int {
unsafe { b.vstring_with_len(len) })
}
unsafe {
mut ptr_base := &byte(b)
mut ptr_base := &u8(b)
mut total_sent := 0
for total_sent < len {
ptr := ptr_base + total_sent