We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b1cffe commit eb59044Copy full SHA for eb59044
1 file changed
lgi/ffi.lua
@@ -80,6 +80,7 @@ function ffi.load_enum(gtype, name)
80
local enum_component = component.create(
81
gtype, is_flags and enum.bitflags_mt or enum.enum_mt, name)
82
local type_class
83
+ -- GLib >= 2.86 deprecates GObject.TypeClass.ref() in favour of .get()
84
if GLib.check_version(2, 86, 0) then
85
type_class = GObject.TypeClass.ref(gtype)
86
else
@@ -97,6 +98,7 @@ function ffi.load_enum(gtype, name)
97
98
enum_component[core.upcase(val.value_nick):gsub('%-', '_')] = val.value
99
end
100
101
+ -- For GLib versions below 2.86, type_class was ref'd and needs to be unref'd
102
103
type_class:unref()
104
0 commit comments