module GirFFI::TypeMap

Constants

TAG_TYPE_MAP

Public Class Methods

map_basic_type(type) click to toggle source
# File lib/gir_ffi/type_map.rb, line 36
def self.map_basic_type type
  sym = type.to_sym
  TAG_TYPE_MAP[sym] || sym
end
type_specification_to_ffitype(type) click to toggle source
# File lib/gir_ffi/type_map.rb, line 41
def self.type_specification_to_ffitype type
  case type
  when Module
    type.to_ffitype
  when Array
    type[0]
  else
    map_basic_type(type)
  end
end