about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bindings/glib/types.ha2
-rw-r--r--cmd/hare-gi/ctype.ha4
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),