Sha256: c5095e8be2a9ee87524ca1d689e2a207ccd758cce6370bf3e9097f77bc23e5f5

Contents?: true

Size: 386 Bytes

Versions: 4

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

4 entries across 4 versions & 1 rubygems

Version Path
gir_ffi-0.15.3 lib/gir_ffi/struct_base.rb
gir_ffi-0.15.2 lib/gir_ffi/struct_base.rb
gir_ffi-0.15.1 lib/gir_ffi/struct_base.rb
gir_ffi-0.15.0 lib/gir_ffi/struct_base.rb