From ab2e8dac222a8efd68c874a9ffeadbbb34d33ad6 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 23 Aug 2022 16:08:24 +0200 Subject: lib: Fix enums being inaccessible from GJS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add enum type generation code to the gir sources. This fixes enum types showing up as 'undefined' in gjs. The change did not impact Python. --✀-- const {Gio, GLib, GnomeBluetooth, GObject} = imports.gi; client = new GnomeBluetooth.Client(); client.connect('notify', () => { print(client.default_adapter_state); }); ml = new GLib.MainLoop(null, false); ml.run() --✀-- --- lib/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/meson.build b/lib/meson.build index 69ba8f58..ed1a881a 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -122,7 +122,7 @@ pkg.generate( ) if enable_gir - gir_sources = sources + headers + gir_sources = sources + headers + enum_sources gir_incs = [ 'Gio-2.0', -- cgit v1.2.1