Sha256: 0e4f706fd2e1d27a58d4b33b1a030cbdd425d645ee4b8dffbbac54738f02002e

Contents?: true

Size: 546 Bytes

Versions: 2

Compression:

Stored size: 546 Bytes

Contents

# frozen_string_literal: true
module GirFFI
  # Class to represent the info for the receiver argument of a callback or
  # signal handler. Implements the necessary parts of IArgumentInfo's
  # interface.
  class ReceiverArgumentInfo
    attr_reader :argument_type

    def initialize(type)
      @argument_type = type
    end

    def direction
      :in
    end

    # Assume we don't need to increase the refcount for the receiver argument.
    def ownership_transfer
      :everything
    end

    def name
      '_instance'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 lib/gir_ffi/receiver_argument_info.rb
gir_ffi-0.11.0 lib/gir_ffi/receiver_argument_info.rb