Sha256: dbe52d5f5be9fb01515071fe9dcb4c9182b50264294e3158156834dc394a4e64

Contents?: true

Size: 366 Bytes

Versions: 10

Compression:

Stored size: 366 Bytes

Contents

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

10 entries across 10 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.9.1 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.9.0 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.8.6 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.8.5 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.8.4 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.8.3 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.8.2 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.8.1 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.8.0 lib/ffi-gobject_introspection/g_error.rb