Sha256: 91beb2d09a22d0c942b5d42807a332aa93a4864289ccf1c1904a77b68a98f830

Contents?: true

Size: 465 Bytes

Versions: 6

Compression:

Stored size: 465 Bytes

Contents

# frozen_string_literal: true
require 'gir_ffi/builders/c_to_ruby_convertor'

module GirFFI
  module Builders
    # Builder that generates code to convert values from C to Ruby, including
    # GValue unpacking. Used by argument builders.
    class FullCToRubyConvertor < CToRubyConvertor
      def conversion
        if @type_info.gvalue?
          "GObject::Value.wrap(#{@argument}).get_value"
        else
          super
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 lib/gir_ffi/builders/full_c_to_ruby_convertor.rb
gir_ffi-0.11.0 lib/gir_ffi/builders/full_c_to_ruby_convertor.rb
gir_ffi-0.10.2 lib/gir_ffi/builders/full_c_to_ruby_convertor.rb
gir_ffi-0.10.1 lib/gir_ffi/builders/full_c_to_ruby_convertor.rb
gir_ffi-0.10.0 lib/gir_ffi/builders/full_c_to_ruby_convertor.rb
gir_ffi-0.10.0.pre1 lib/gir_ffi/builders/full_c_to_ruby_convertor.rb