Class: GirFFI::ErrorArgumentBuilder

Inherits:
BaseArgumentBuilder show all
Defined in:
lib/gir_ffi/error_argument_builder.rb

Overview

Implements argument processing for error handling arguments. These arguments are not part of the introspected signature, but their presence is indicated by the ‘throws’ attribute of the function.

Constant Summary

Constants inherited from BaseArgumentBuilder

BaseArgumentBuilder::KEYWORDS, BaseArgumentBuilder::TAG_TO_WRAPPER_CLASS_MAP

Instance Attribute Summary

Attributes inherited from BaseArgumentBuilder

#array_arg, #length_arg, #name, #retname

Instance Method Summary collapse

Methods inherited from BaseArgumentBuilder

#argument_class_name, #array_size, #callarg, #cleanup, #elm_t, #inarg, #initialize, #retval, #safe, #specialized_type_tag, #subtype_tag_or_class_name, #type_info

Constructor Details

This class inherits a constructor from GirFFI::BaseArgumentBuilder

Instance Method Details

#postObject



12
13
14
# File 'lib/gir_ffi/error_argument_builder.rb', line 12

def post
  [ "GirFFI::ArgHelper.check_error(#{callarg})" ]
end

#preObject



8
9
10
# File 'lib/gir_ffi/error_argument_builder.rb', line 8

def pre
  [ "#{callarg} = FFI::MemoryPointer.new(:pointer).write_pointer nil" ]
end