Module: GirFFI::InfoExt::IFieldInfo

Included in:
GObjectIntrospection::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



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

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


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

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