Sha256: 06703f51e9f42404e1d5044839bdcaeaf6a0545c3199225f8b233ba379ae7182

Contents?: true

Size: 751 Bytes

Versions: 12

Compression:

Stored size: 751 Bytes

Contents

require 'gir_ffi/builders/base_argument_builder'

module GirFFI
  module Builders
    # 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.
    class ErrorArgumentBuilder < BaseArgumentBuilder
      def method_argument_name
        nil
      end

      def return_value_name
        nil
      end

      def capture_variable_name
        nil
      end

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

      def post_conversion
        ["GirFFI::ArgHelper.check_error(#{call_argument_name})"]
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gir_ffi-0.8.6 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.8.5 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.8.4 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.8.3 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.8.2 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.8.1 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.8.0 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.7.10 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.7.9 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.7.8 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.7.7 lib/gir_ffi/builders/error_argument_builder.rb
gir_ffi-0.7.6 lib/gir_ffi/builders/error_argument_builder.rb