summaryrefslogtreecommitdiff
path: root/tools/generate.c
diff options
context:
space:
mode:
authorColin Walters <walters@src.gnome.org>2008-10-02 13:25:46 +0000
committerColin Walters <walters@src.gnome.org>2008-10-02 13:25:46 +0000
commitddb93b98b955bd5d3080835047abf7a641abf440 (patch)
tree5a94d5960badb5ed44a33f2da4153b775520f232 /tools/generate.c
parent1ab23b133ad9b48b9f67117f150026ff48daa927 (diff)
downloadgobject-introspection-ddb93b98b955bd5d3080835047abf7a641abf440.tar.gz
Bug 554632: Create type tag for GType
svn path=/trunk/; revision=641
Diffstat (limited to 'tools/generate.c')
-rw-r--r--tools/generate.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/tools/generate.c b/tools/generate.c
index dca2cdac..5f10d27c 100644
--- a/tools/generate.c
+++ b/tools/generate.c
@@ -64,30 +64,6 @@ write_type_info (const gchar *namespace,
GITypeInfo *type;
gboolean is_pointer;
- const gchar* basic[] = {
- "none",
- "boolean",
- "int8",
- "uint8",
- "int16",
- "uint16",
- "int32",
- "uint32",
- "int64",
- "uint64",
- "int",
- "uint",
- "long",
- "ulong",
- "ssize",
- "size",
- "float",
- "double",
- "time_t",
- "utf8",
- "filename"
- };
-
check_unresolved ((GIBaseInfo*)info);
tag = g_type_info_get_tag (info);
@@ -100,8 +76,8 @@ write_type_info (const gchar *namespace,
else
g_fprintf (file, "%s", "none");
}
- else if (tag < GI_TYPE_TAG_ARRAY)
- g_fprintf (file, "%s", basic[tag]);
+ else if (G_TYPE_TAG_IS_BASIC (tag))
+ g_fprintf (file, "%s", g_type_tag_to_string (tag));
else if (tag == GI_TYPE_TAG_ARRAY)
{
gint length;