From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Mon, 22 Sep 2025 00:32:48 +0200 Subject: [PATCH] Use TypeClass.get instead of .ref `ref` became unintrospectable in GLib 2.86. --- lgi/ffi.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lgi/ffi.lua b/lgi/ffi.lua index 10426325b265..617db8e815fc 100644 --- a/lgi/ffi.lua +++ b/lgi/ffi.lua @@ -80,14 +80,13 @@ function ffi.load_enum(gtype, name) local is_flags = GObject.Type.is_a(gtype, GObject.Type.FLAGS) local enum_component = component.create( gtype, is_flags and enum.bitflags_mt or enum.enum_mt, name) - local type_class = GObject.TypeClass.ref(gtype) + local type_class = GObject.TypeClass.get(gtype) local enum_class = core.record.cast( type_class, is_flags and GObject.FlagsClass or GObject.EnumClass) for i = 0, enum_class.n_values - 1 do local val = core.record.fromarray(enum_class.values, i) enum_component[core.upcase(val.value_nick):gsub('%-', '_')] = val.value end - type_class:unref() return enum_component end