Skip to content

module internal.dlopen

Source: stdlib/internal/dlopen.codon


DL_info @tuple Class is named tuple (cannot write fields)

Fields

dli_fname: cobj

dli_fbase: cobj

dli_sname: cobj

dli_saddr: cobj

dli_version: i32

dli_reserved1: i32

dli_reserved: Ptr[i32]


c_dlerror() @C Function is external C function


c_dlopen(_: cobj, _: int) @C Function is external C function


c_dlsym(_: cobj, _: cobj) @C Function is external C function


c_dlclose(_: cobj) @C Function is external C function


dladdr(_: cobj, _: Ptr[DL_info]) @C Function is external C function


RTLD_LAZY: Literal[int] = 1


RTLD_NOW: Literal[int] = 2


RTLD_GLOBAL: Literal[int] = (8 if __apple__ else 256)


RTLD_LOCAL: Literal[int] = (0 if __apple__ else 256)


dlext()


dlerror() @pure Function has no side effects and returns same value for same inputs


dlopen(name: str, flag: int = (RTLD_NOW | RTLD_GLOBAL))


dlsym(lib, name: str, Fn: type)


dlclose(handle: cobj)


get_library_file_name(handle: cobj)