value

value(ty, val=nil) Instance Public methods Alias for: create_value

union

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

typealias

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

struct

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

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.

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.

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_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

handler

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

extern

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