close

close Instance Public methods Close this handle. Calling close more than once will raise a Fiddle::DLError exception.

[] 2

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

sym

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

new

new(lib = nil, flags = Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL) Class Public methods Create a new handler that opens library named lib with flags. If no library is specified, RTLD_DEFAULT is used.

[]

sym(name) Class Public methods Get the address as an Integer for the function named name. The function is searched via dlsym on RTLD_NEXT. See man(3) dlsym() for more info.

to_i

to_i() Instance Public methods The integer memory location of this function

call

call(*args) Instance Public methods Calls the constructed Function, with args For an example see Fiddle::Function

new

new(ptr, args, ret_type, abi = DEFAULT) Class Public methods Constructs a Function object. ptr is a referenced function, of a Fiddle::Handle args is an Array of arguments, passed to the ptr function ret_type is the return type of the function abi is the ABI of the function

set_ctypes

set_ctypes(types) Instance Public methods Calculate the necessary offset and for each union member with the given types

size

size(types) Class Public methods Returns the size needed for the union with the given types. Fiddle::CUnionEntity.size( [ Fiddle::TYPE_DOUBLE, Fiddle::TYPE_INT, Fiddle::TYPE_CHAR, Fiddle::TYPE_VOIDP ]) #=> 8