Sha256: 30be68afba8eaffdeab96afb7b44f298e25327726850aa767d6124469cc05022

Contents?: true

Size: 386 Bytes

Versions: 3

Compression:

Stored size: 386 Bytes

Contents

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

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.7.10 lib/gir_ffi/builders/closure_convertor.rb
gir_ffi-0.7.9 lib/gir_ffi/builders/closure_convertor.rb
gir_ffi-0.7.8 lib/gir_ffi/builders/closure_convertor.rb