[gtk-doc/gtk-doc-for-gtk4] scangobj: Use plain C types for some types
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc/gtk-doc-for-gtk4] scangobj: Use plain C types for some types
- Date: Mon, 3 Aug 2020 21:31:51 +0000 (UTC)
commit 3651bf398759a1772d6fa249ee4c108e2897207a
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Aug 3 17:16:20 2020 -0400
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.
gtkdoc/scangobj.py | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/gtkdoc/scangobj.py b/gtkdoc/scangobj.py
index 8b92a81..0069c0a 100644
--- a/gtkdoc/scangobj.py
+++ b/gtkdoc/scangobj.py
@@ -338,29 +338,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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]