mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
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:
parent
8461962337
commit
87fd1d5dad
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user