Fix g_type_info_is_pointer() for overriden types of arguments.

Algorithm which detects whether argument type is pointer checks for
trailing '*' characters in c:type .gir elements.  This failed if ctype
is either 'gpointer' or 'gconstpointer'.  Add specific check for
gpointer/gconstpointer types when deducing pointerness of the type.

https://bugzilla.gnome.org/show_bug.cgi?id=658848
This commit is contained in:
Pavel Holejsovsky 2011-09-12 19:54:39 +02:00
parent 8461962337
commit 87fd1d5dad

View File

@ -1947,6 +1947,10 @@ start_type (GMarkupParseContext *context,
const char *cp = ctype + strlen(ctype) - 1;
while (cp > ctype && *cp-- == '*')
pointer_depth++;
if (g_str_has_prefix (ctype, "gpointer")
|| g_str_has_prefix (ctype, "gconstpointer"))
pointer_depth++;
}
if (ctx->current_typed->type == G_IR_NODE_PARAM &&