From c913c8e1ce6479c24361f8628e9bc07432878f62 Mon Sep 17 00:00:00 2001 From: Alexey Yerin Date: Tue, 30 Apr 2024 22:20:08 +0300 Subject: Prevent GObject -> GLib -> GObject circular dependency --- bindings/glib/types.ha | 2 ++ cmd/hare-gi/ctype.ha | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/bindings/glib/types.ha b/bindings/glib/types.ha index c973570..2492c4e 100644 --- a/bindings/glib/types.ha +++ b/bindings/glib/types.ha @@ -1,3 +1,5 @@ +export type Type = size; + // Boolean type used by GLib and related libraries, equivalent to gboolean in C. export type boolean = uint; diff --git a/cmd/hare-gi/ctype.ha b/cmd/hare-gi/ctype.ha index c970b49..37671dd 100644 --- a/cmd/hare-gi/ctype.ha +++ b/cmd/hare-gi/ctype.ha @@ -155,6 +155,10 @@ let map: [](str, ctype) = [ // ("_Value__data__union", (cmodule::GOBJECT, "ValueUnion")), + // Move GType down to GLib to avoid a circular dependency of + // GObject -> GLib -> GObject + ("GType", (cmodule::GLIB, "Type")), + // ("pid_t", cbuiltin::UINT), ("uid_t", cbuiltin::UINT), -- cgit 1.3.0-6-gf8a5