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

20 lines
367 B
V
Raw Normal View History

2020-04-28 12:53:55 +03:00
module dl
#include <dlfcn.h>
fn C.dlopen(filename charptr, flags int) voidptr
fn C.dlsym(handle voidptr, symbol charptr) voidptr
pub const (
RTLD_NOW = C.RTLD_NOW
DL_EXT = '.so'
)
pub fn open(filename string, flags int) voidptr {
return C.dlopen(filename.str, flags)
}
pub fn sym(handle voidptr, symbol string) voidptr {
return C.dlsym(handle, symbol.str)
}