Module: GirFFI::InfoExt::IValueInfo

Included in:
GObjectIntrospection::IValueInfo
Defined in:
lib/gir_ffi/info_ext/i_value_info.rb

Overview

Extensions for GObjectIntrospection::IValueInfo needed by GirFFI

Instance Method Summary collapse

Instance Method Details

#constant_nameObject



7
8
9
10
11
12
13
14
# File 'lib/gir_ffi/info_ext/i_value_info.rb', line 7

def constant_name
  upcased_name = name.upcase
  if /^[0-9]/.match?(upcased_name)
    "VALUE_#{upcased_name}"
  else
    upcased_name
  end
end

#to_callback_ffi_typeObject



16
17
18
19
20
# File 'lib/gir_ffi/info_ext/i_value_info.rb', line 16

def to_callback_ffi_type
  return :pointer if direction != :in

  argument_type.to_callback_ffi_type
end