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

dl: fix v -cflags "-Werror" use_test.v

This commit is contained in:
Delyan Angelov 2021-03-19 23:27:14 +02:00
parent a386be6505
commit b0e225ac2d
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 2 additions and 4 deletions

View File

@ -35,8 +35,6 @@ const (
skip_with_werror = [
'vlib/sync/array_rlock_test.v',
'vlib/clipboard/clipboard_test.v',
'vlib/dl/dl_test.v',
'vlib/dl/example/use_test.v',
'vlib/eventbus/eventbus_test.v',
'vlib/gx/color_test.v',
'vlib/json/json_test.v',

View File

@ -15,7 +15,7 @@ fn C.dlclose(handle voidptr) int
// open loads the dynamic shared object.
pub fn open(filename string, flags int) voidptr {
return C.dlopen(filename.str, flags)
return C.dlopen(charptr(filename.str), flags)
}
// close frees a given shared object.
@ -25,5 +25,5 @@ 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, symbol.str)
return C.dlsym(handle, charptr(symbol.str))
}