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

all: remove byteptr and charptr; replace them with &byte and &char

This commit is contained in:
Alexander Medvednikov
2021-04-04 17:43:32 +03:00
parent 8dd4a63913
commit 57e6138a61
32 changed files with 250 additions and 226 deletions

View File

@ -17,7 +17,7 @@ fn C.dlerror() charptr
// open loads the dynamic shared object.
pub fn open(filename string, flags int) voidptr {
return C.dlopen(charptr(filename.str), flags)
return C.dlopen(&char(filename.str), flags)
}
// close frees a given shared object.
@ -27,7 +27,7 @@ pub fn close(handle voidptr) bool {
// sym returns an address of a symbol in a given shared object.
pub fn sym(handle voidptr, symbol string) voidptr {
return C.dlsym(handle, charptr(symbol.str))
return C.dlsym(handle, &char(symbol.str))
}
// dlerror provides a text error diagnostic message for functions in `dl`