dlload

dlload(*libs) Instance Public methods Creates an array of handlers for the given libs, can be an instance of Fiddle::Handle, Fiddle::Importer, or will create a new istance of Fiddle::Handle using Fiddle.dlopen Raises a DLError if the library cannot be loaded. See Fiddle.dlopen

create_value

create_value(ty, val=nil) Instance Public methods Creates a class to wrap the C struct with the value ty See also #struct value

bind_function

bind_function(name, ctype, argtype, call_type = nil, &block) Instance Public methods Returns a new closure wrapper for the name function. ctype is the return type of the function argtype is an Array of arguments, passed to the callback function call_type is the abi of the closure block is passed to the callback See Fiddle::Closure

bind

bind(signature, *opts, &blk) Instance Public methods Creates a global method from the given C signature using the given opts as bind parameters with the given block.

[]

[](name) Instance Public methods Returns the function mapped to name, that was created by either #extern or #bind

to_i

to_i Instance Public methods Returns the memory address for this handle.

sym 2

sym(name) Instance Public methods Get the address as an Integer for the function named name.

enable_close

enable_close Instance Public methods Enable a call to dlclose() when this handle is garbage collected.

disable_close

disable_close Instance Public methods Disable a call to dlclose() when this handle is garbage collected.

close_enabled?

close_enabled? Instance Public methods Returns true if dlclose() will be called when this handle is garbage collected. See man(3) dlclose() for more info.