diff options
author | Alexey Yerin <yyp@disroot.org> | 2024-04-30 22:20:08 +0300 |
---|---|---|
committer | Alexey Yerin <yyp@disroot.org> | 2024-04-30 22:20:08 +0300 |
commit | c913c8e1ce6479c24361f8628e9bc07432878f62 (patch) | |
tree | 324bc47c4a448b2e8d9a242a40f39f78082160f4 | |
parent | e84c233a2ac0b428c547fcd09dd8eff31964c1bd (diff) |
Prevent GObject -> GLib -> GObject circular dependency
-rw-r--r-- | bindings/glib/types.ha | 2 | ||||
-rw-r--r-- | cmd/hare-gi/ctype.ha | 4 |
2 files changed, 6 insertions, 0 deletions
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) = [ // <gobject/gvalue.h> ("_Value__data__union", (cmodule::GOBJECT, "ValueUnion")), + // Move GType down to GLib to avoid a circular dependency of + // GObject -> GLib -> GObject + ("GType", (cmodule::GLIB, "Type")), + // <unistd.h> ("pid_t", cbuiltin::UINT), ("uid_t", cbuiltin::UINT), |