Sha256: dca91456226f19eeab94f0467e1de2ae4c731bf1d06e213dd08f2ef032a048f8

Contents?: true

Size: 396 Bytes

Versions: 9

Compression:

Stored size: 396 Bytes

Contents

# frozen_string_literal: true
module GObjectIntrospection
  # Wraps GLib's GError struct.
  class GError
    # GLib's GError struct.
    class Struct < FFI::Struct
      layout :domain, :uint32,
             :code, :int,
             :message, :string
    end

    def initialize(ptr)
      @struct = self.class::Struct.new(ptr)
    end

    def message
      @struct[:message]
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.11.0 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.10.2 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.10.1 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.10.0 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.10.0.pre1 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.9.5 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.9.4 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.9.3 lib/ffi-gobject_introspection/g_error.rb