From 11f7bd64899b8a691e0b73555da6cada9802d328 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 22 Aug 2008 22:15:28 +0000 Subject: [PATCH] Don't hardcode integers, use GITypeTag. 2008-08-22 Colin Walters * girepository/girnode.c: Don't hardcode integers, use GITypeTag. svn path=/trunk/; revision=465 --- ChangeLog | 5 +++++ girepository/girnode.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 058ee63..01f1e64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-22 Colin Walters + + * girepository/girnode.c: Don't hardcode integers, + use GITypeTag. + 2008-08-22 Johan Dahlin * giscanner/sourcescanner.py: diff --git a/girepository/girnode.c b/girepository/girnode.c index 06e1b8e..4401080 100644 --- a/girepository/girnode.c +++ b/girepository/girnode.c @@ -1068,12 +1068,12 @@ serialize_type (GIrModule *module, "any" }; - if (node->tag < 20) + if (node->tag < GI_TYPE_TAG_ARRAY) { g_string_append_printf (str, "%s%s", basic[node->tag], node->is_pointer ? "*" : ""); } - else if (node->tag == 20) + else if (node->tag == GI_TYPE_TAG_ARRAY) { serialize_type (module, modules, node->parameter_type1, str); g_string_append (str, "["); @@ -1087,7 +1087,7 @@ serialize_type (GIrModule *module, g_string_append (str, "]"); } - else if (node->tag == 21) + else if (node->tag == GI_TYPE_TAG_INTERFACE) { GIrNode *iface; gchar *name; @@ -1103,7 +1103,7 @@ serialize_type (GIrModule *module, g_string_append_printf (str, "%s%s", name, node->is_pointer ? "*" : ""); } - else if (node->tag == 22) + else if (node->tag == GI_TYPE_TAG_GLIST) { g_string_append (str, "GList"); if (node->parameter_type1) @@ -1113,7 +1113,7 @@ serialize_type (GIrModule *module, g_string_append (str, ">"); } } - else if (node->tag == 23) + else if (node->tag == GI_TYPE_TAG_GSLIST) { g_string_append (str, "GSList"); if (node->parameter_type1) @@ -1123,7 +1123,7 @@ serialize_type (GIrModule *module, g_string_append (str, ">"); } } - else if (node->tag == 24) + else if (node->tag == GI_TYPE_TAG_GHASH) { g_string_append (str, "GHashTable<"); if (node->parameter_type1) @@ -1135,7 +1135,7 @@ serialize_type (GIrModule *module, g_string_append (str, ">"); } } - else if (node->tag == 25) + else if (node->tag == GI_TYPE_TAG_ERROR) { g_string_append (str, "GError"); if (node->errors) -- 2.7.4