/usr/lib/ruby/vendor_ruby/ffi-gobject_introspection/g_error.rb is in ruby-gir-ffi 0.9.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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
|