class GirFFI::Builders::VFuncArgumentBuilder

Convertor for arguments for vfuncs. Used when building the argument mapper for vfuncs.

Public Instance Methods

post_conversion() click to toggle source
# File lib/gir_ffi/builders/vfunc_argument_builder.rb, line 18
def post_conversion
  if outgoing_ref_needed?
    ["#{result_name}.ref"] + super
  else
    super
  end
end
pre_conversion() click to toggle source
# File lib/gir_ffi/builders/vfunc_argument_builder.rb, line 10
def pre_conversion
  if ingoing_ref_needed?
    super + ["#{pre_converted_name}&.ref"]
  else
    super
  end
end

Private Instance Methods

ingoing_ref_needed?() click to toggle source
# File lib/gir_ffi/builders/vfunc_argument_builder.rb, line 28
def ingoing_ref_needed?
  direction == :in &&
    ownership_transfer == :nothing &&
    specialized_type_tag == :object
end
outgoing_ref_needed?() click to toggle source
# File lib/gir_ffi/builders/vfunc_argument_builder.rb, line 34
def outgoing_ref_needed?
  direction == :out &&
    ownership_transfer == :everything &&
    specialized_type_tag == :object
end