Sha256: d56e3a243d7bdeb8becb52907fe7a842dc21d7f52b9cfbf6e551ffcb8ab00574

Contents?: true

Size: 553 Bytes

Versions: 7

Compression:

Stored size: 553 Bytes

Contents

# frozen_string_literal: true
module GirFFI
  module InfoExt
    # Extensions for GObjectIntrospection::IVFuncInfo needed by GirFFI
    # TODO: Merge implementation with ICallbackInfo and ISignalInfo extensions.
    module IVFuncInfo
      def argument_ffi_types
        args.map(&:to_callback_ffi_type).tap do |types|
          types << :pointer if throws?
        end
      end

      def return_ffi_type
        return_type.to_callback_ffi_type
      end
    end
  end
end

GObjectIntrospection::IVFuncInfo.send :include, GirFFI::InfoExt::IVFuncInfo

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gir_ffi-0.10.2 lib/gir_ffi/info_ext/i_vfunc_info.rb
gir_ffi-0.10.1 lib/gir_ffi/info_ext/i_vfunc_info.rb
gir_ffi-0.10.0 lib/gir_ffi/info_ext/i_vfunc_info.rb
gir_ffi-0.10.0.pre1 lib/gir_ffi/info_ext/i_vfunc_info.rb
gir_ffi-0.9.5 lib/gir_ffi/info_ext/i_vfunc_info.rb
gir_ffi-0.9.4 lib/gir_ffi/info_ext/i_vfunc_info.rb
gir_ffi-0.9.3 lib/gir_ffi/info_ext/i_vfunc_info.rb