Sha256: 55f06ac59d901ab6996de1edbee941ada0542c1cc4af143cbc286fef65b503ea

Contents?: true

Size: 417 Bytes

Versions: 9

Compression:

Stored size: 417 Bytes

Contents

# frozen_string_literal: true
module GirFFI
  module Builders
    # Builder that generates code to convert closure arguments ('user data')
    # from C to Ruby. Used by argument builders.
    class ClosureConvertor
      def initialize(argument_name)
        @argument_name = argument_name
      end

      def conversion
        "GirFFI::ArgHelper::OBJECT_STORE.fetch(#{@argument_name})"
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 lib/gir_ffi/builders/closure_convertor.rb
gir_ffi-0.11.0 lib/gir_ffi/builders/closure_convertor.rb
gir_ffi-0.10.2 lib/gir_ffi/builders/closure_convertor.rb
gir_ffi-0.10.1 lib/gir_ffi/builders/closure_convertor.rb
gir_ffi-0.10.0 lib/gir_ffi/builders/closure_convertor.rb
gir_ffi-0.10.0.pre1 lib/gir_ffi/builders/closure_convertor.rb
gir_ffi-0.9.5 lib/gir_ffi/builders/closure_convertor.rb
gir_ffi-0.9.4 lib/gir_ffi/builders/closure_convertor.rb
gir_ffi-0.9.3 lib/gir_ffi/builders/closure_convertor.rb