Sha256: bd3c0e881cef1310ab77e6b257537e40089b631d8215a447d0146a495a2290eb

Contents?: true

Size: 397 Bytes

Versions: 22

Compression:

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

22 entries across 22 versions & 1 rubygems

Version Path
gir_ffi-0.17.0 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.16.1 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.16.0 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.15.9 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.15.8 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.15.7 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.15.6 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.15.5 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.15.4 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.15.3 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.15.2 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.15.1 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.15.0 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.14.1 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.14.0 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.13.1 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.13.0 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.12.1 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.12.0 lib/ffi-gobject_introspection/g_error.rb
gir_ffi-0.11.4 lib/ffi-gobject_introspection/g_error.rb