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

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

extern

extern(signature, *opts) Instance Public methods Creates a global method from the given C signature.

handler

handler() Instance Public methods The Fiddle::CompositeHandler instance Will raise an error if no handlers are open.

import_function

import_function(name, ctype, argtype, call_type = nil) Instance Public methods Returns a new Fiddle::Function instance at the memory address of the given name function. Raises a DLError if the name doesn't exist. argtype is an Array of arguments, passed to the name function. ctype is the return type of the function call_type is the ABI of the function See also Fiddle:Function.new See Fiddle::CompositeHandler#sym and Fiddle::Handler.sym

import_symbol

import_symbol(name) Instance Public methods Returns a new Fiddle::Pointer instance at the memory address of the given name symbol. Raises a DLError if the name doesn't exist. See Fiddle::CompositeHandler#sym and Fiddle::Handle.sym

import_value

import_value(ty, addr) Instance Public methods Returns a new instance of the C struct with the value ty at the addr address.

sizeof

sizeof(ty) Instance Public methods Returns the sizeof ty, using Fiddle::CParser#parse_ctype to determine the C type and the appropriate Fiddle constant.

struct

struct(signature) Instance Public methods Creates a class to wrap the C struct described by signature. MyStruct = struct ['int i', 'char c']

typealias

typealias(alias_type, orig_type) Instance Public methods Sets the type alias for alias_type as orig_type