Sha256: e0d336c59181f0a730bb6a2c6687bd67dbb3bff0fa8c23836b03195b9343d9f7

Contents?: true

Size: 385 Bytes

Versions: 2

Compression:

Stored size: 385 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

2 entries across 2 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 lib/gir_ffi/struct_base.rb
gir_ffi-0.11.0 lib/gir_ffi/struct_base.rb