Sha256: b42caaa20178fa6cb617a36ffb6dbe8b8d5a18a8fce1b349310f38c83e5b2675

Contents?: true

Size: 466 Bytes

Versions: 13

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true

require "gir_ffi/builders/base_return_value_builder"

module GirFFI
  module Builders
    # Implements post-conversion for initializer functions
    class InitializerReturnValueBuilder < BaseReturnValueBuilder
      def post_conversion
        result = []
        result << "store_pointer(#{capture_variable_name})"
        result << "@struct.owned = true" if specialized_type_tag == :struct
        result
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gir_ffi-0.17.0 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.16.1 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.16.0 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.15.9 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.15.8 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.15.7 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.15.6 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.15.5 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.15.4 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.15.3 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.15.2 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.15.1 lib/gir_ffi/builders/initializer_return_value_builder.rb
gir_ffi-0.15.0 lib/gir_ffi/builders/initializer_return_value_builder.rb