module FFI

Constants

PrimitiveTypes
TypeMap

Public Class Methods

exporter() click to toggle source
# File lib/ffi-compiler/fake_ffi/ffi.rb, line 7
def self.exporter
  @@exporter ||= Exporter.new(nil)
end
exporter=(exporter) click to toggle source
# File lib/ffi-compiler/fake_ffi/ffi.rb, line 3
def self.exporter=(exporter)
  @@exporter = exporter
end
find_type(type) click to toggle source
# File lib/ffi-compiler/fake_ffi/ffi.rb, line 80
def self.find_type(type)
  return type if type.is_a?(Type) or type.is_a?(CallbackInfo)

  t = TypeMap[type]
  return t unless t.nil?

  if PrimitiveTypes.has_key?(type)
    return TypeMap[type] = Type.new(PrimitiveTypes[type])
  end
  raise TypeError.new("cannot resolve type #{type}")
end