Module: GirFFI::InfoExt::IFieldInfo

Defined in:
lib/gir_ffi/info_ext/i_field_info.rb

Overview

Extensions for GObjectIntrospection::IFieldInfo needed by GirFFI

Instance Method Summary collapse

Instance Method Details

#layout_specificationObject



6
7
8
# File 'lib/gir_ffi/info_ext/i_field_info.rb', line 6

def layout_specification
  [name.to_sym, field_type.to_ffi_type, offset]
end


10
11
12
13
# File 'lib/gir_ffi/info_ext/i_field_info.rb', line 10

def related_array_length_field
  index = field_type.array_length
  container.fields[index] if index > -1
end