Sha256: 3f06a4c0dba76ea597a2c5d99733930ae210eaf85b2655c14a0bc0b71fab93cb

Contents?: true

Size: 386 Bytes

Versions: 9

Compression:

Stored size: 386 Bytes

Contents

# frozen_string_literal: true

require 'gir_ffi/struct_like_base'

module GirFFI
  # Base class for generated classes representing GLib structs.
  class StructBase < ClassBase
    extend FFI::DataConverter
    include GirFFI::StructLikeBase

    def initialize
      @struct = self.class::Struct.new
      @struct.owned = true
      @struct.to_ptr.autorelease = false
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.14.1 lib/gir_ffi/struct_base.rb
gir_ffi-0.14.0 lib/gir_ffi/struct_base.rb
gir_ffi-0.13.1 lib/gir_ffi/struct_base.rb
gir_ffi-0.13.0 lib/gir_ffi/struct_base.rb
gir_ffi-0.12.1 lib/gir_ffi/struct_base.rb
gir_ffi-0.12.0 lib/gir_ffi/struct_base.rb
gir_ffi-0.11.4 lib/gir_ffi/struct_base.rb
gir_ffi-0.11.3 lib/gir_ffi/struct_base.rb
gir_ffi-0.11.2 lib/gir_ffi/struct_base.rb