nitc :: ForeignCodeLib :: defaultinit
nitc :: ForeignCodeLib :: dlopen
Open and load the library atpath
nitc :: ForeignCodeLib :: dlsym
Find theForeignCodeEntry
at symbol_name
nitc $ ForeignCodeLib :: SELF
Type of this instance, automatically specialized in every classcore :: Pointer :: address_is_null
Is the address behind this Object at NULL?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
core :: Pointer :: defaultinit
nitc :: ForeignCodeLib :: defaultinit
nitc :: ForeignCodeLib :: dlopen
Open and load the library atpath
nitc :: ForeignCodeLib :: dlsym
Find theForeignCodeEntry
at symbol_name
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Pointer :: native_equals
core :: Object :: output_class_name
Display class name on stdout (debug only).core :: Pointer :: premultiply_alpha
Multiply RGB values by their alpha value
# Handle to foreign code library
private extern class ForeignCodeLib
# Open and load the library at `path`
new dlopen(path: CString) `{
return dlopen(path, RTLD_LOCAL | RTLD_NOW);
`}
# Find the `ForeignCodeEntry` at `symbol_name`
fun dlsym(symbol_name: CString): ForeignCodeEntry `{
return dlsym(self, symbol_name);
`}
end
src/interpreter/dynamic_loading_ffi/dynamic_loading_ffi.nit:225,1--236,3