summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-08-03 17:16:20 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-10-01 14:51:04 -0400
commit531cc0d10983f412adb0539c01be0150152ffe90 (patch)
treecb202d73f07194309d6f9e0b1a6067990dd7f579
parent6b9a39409e5635e973f5e6fe53c507b318f61a46 (diff)
downloadgtk-doc-531cc0d10983f412adb0539c01be0150152ffe90.tar.gz
scangobj: Use plain C types for some types
Use char, int, float, double, instead of their g-prefixed counterparts. This follows the GTK4 api style changes.
-rw-r--r--gtkdoc/scangobj.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/gtkdoc/scangobj.py b/gtkdoc/scangobj.py
index 296fd85..bf4e1ea 100644
--- a/gtkdoc/scangobj.py
+++ b/gtkdoc/scangobj.py
@@ -339,29 +339,37 @@ get_type_name (GType type, gboolean * is_pointer)
switch (type) {
case G_TYPE_NONE:
- case G_TYPE_CHAR:
case G_TYPE_UCHAR:
case G_TYPE_BOOLEAN:
- case G_TYPE_INT:
case G_TYPE_UINT:
case G_TYPE_LONG:
case G_TYPE_ULONG:
- case G_TYPE_FLOAT:
- case G_TYPE_DOUBLE:
case G_TYPE_POINTER:
/* These all have normal C type names so they are OK. */
return type_name;
+ case G_TYPE_CHAR:
+ return "char";
+
+ case G_TYPE_INT:
+ return "int";
+
+ case G_TYPE_FLOAT:
+ return "float";
+
+ case G_TYPE_DOUBLE:
+ return "double";
+
case G_TYPE_STRING:
/* A GtkString is really a gchar*. */
*is_pointer = TRUE;
- return "gchar";
+ return "char";
case G_TYPE_ENUM:
case G_TYPE_FLAGS:
/* We use a gint for both of these. Hopefully a subtype with a decent
name will be registered and used instead, as GTK+ does itself. */
- return "gint";
+ return "int";
case G_TYPE_BOXED:
/* The boxed type shouldn't be used itself, only subtypes. Though we