Module: Fiddle

Defined in:
fiddle.c,
closure.c,
lib/fiddle.rb,
lib/fiddle/closure.rb,
lib/fiddle/function.rb

Overview

Description

A libffi wrapper.

Defined Under Namespace

Classes: Closure, Function

Constant Summary collapse

TYPE_VOID =

C type - void

INT2NUM(TYPE_VOID)
TYPE_VOIDP =

C type - void*

INT2NUM(TYPE_VOIDP)
TYPE_CHAR =

C type - char

INT2NUM(TYPE_CHAR)
TYPE_SHORT =

C type - short

INT2NUM(TYPE_SHORT)
TYPE_INT =

C type - int

INT2NUM(TYPE_INT)
TYPE_LONG =

C type - long

INT2NUM(TYPE_LONG)
TYPE_LONG_LONG =

C type - long long

INT2NUM(TYPE_LONG_LONG)
TYPE_FLOAT =

C type - float

INT2NUM(TYPE_FLOAT)
TYPE_DOUBLE =

C type - double

INT2NUM(TYPE_DOUBLE)
WINDOWS =
Qfalse
Pointer =

A reference to DL::CPtr

DL::CPtr

Class Method Summary collapse

Class Method Details

.last_errorObject

Returns the last Error of the current executing Thread or nil if none



25
26
27
# File 'lib/fiddle.rb', line 25

def self.last_error
  Thread.current[:__FIDDLE_LAST_ERROR__]
end

.last_error=(error) ⇒ Object

Sets the last Error of the current executing Thread to error



30
31
32
33
# File 'lib/fiddle.rb', line 30

def self.last_error= error
  Thread.current[:__DL2_LAST_ERROR__] = error
  Thread.current[:__FIDDLE_LAST_ERROR__] = error
end

.win32_last_errorObject

Returns the last win32 Error of the current executing Thread or nil if none



14
15
16
# File 'lib/fiddle.rb', line 14

def self.win32_last_error
  Thread.current[:__FIDDLE_WIN32_LAST_ERROR__]
end

.win32_last_error=(error) ⇒ Object

Sets the last win32 Error of the current executing Thread to error



19
20
21
# File 'lib/fiddle.rb', line 19

def self.win32_last_error= error
  Thread.current[:__FIDDLE_WIN32_LAST_ERROR__] = error
end