Sha256: b60ab499804766c5692d9667216abf5990d50a1e611733b1ec103eeccdb29b68

Contents?: true

Size: 459 Bytes

Versions: 3

Compression:

Stored size: 459 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
        base = super
        if @type_info.gvalue?
          "#{base}.get_value"
        else
          base
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.9.5 lib/gir_ffi/builders/full_c_to_ruby_convertor.rb
gir_ffi-0.9.4 lib/gir_ffi/builders/full_c_to_ruby_convertor.rb
gir_ffi-0.9.3 lib/gir_ffi/builders/full_c_to_ruby_convertor.rb