Class: GirFFI::Builders::ErrorArgumentBuilder

Inherits:
BaseArgumentBuilder show all
Defined in:
lib/gir_ffi/builders/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

Instance Attribute Summary

Attributes inherited from BaseArgumentBuilder

#arginfo, #array_arg, #is_closure, #length_arg

Instance Method Summary collapse

Methods inherited from BaseArgumentBuilder

#argument_class_name, #array_length_idx, #callarg, #direction, #initialize, #name, #new_variable, #safe, #specialized_type_tag, #type_info

Constructor Details

This class inherits a constructor from GirFFI::Builders::BaseArgumentBuilder

Instance Method Details

#postObject



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

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

#preObject



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

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