Commit 17d4e6d9 authored by Christian Hergert's avatar Christian Hergert

signature: handle glib_signal better

parent efc3b79c
......@@ -1165,7 +1165,6 @@ girst_parser_object_get_signature (GirstParserObject *self)
g_autofree gchar *formatted = NULL;
GirstParserObject *return_value;
GirstParserObject *params;
GPtrArray *children;
guint space = 0;
guint begin;
......@@ -1268,31 +1267,36 @@ girst_parser_object_get_signature (GirstParserObject *self)
goto cleanup;
}
children = girst_parser_object_get_children (params);
for (guint i = 0; i < children->len; i++)
if (params != NULL)
{
GirstParserObject *child = g_ptr_array_index (children, i);
g_autofree gchar *c_type = NULL;
g_autofree gchar *name = NULL;
if (!GIRST_IS_PARAMETER (child) &&
!GIRST_IS_INSTANCE_PARAMETER (child) &&
!GIRST_IS_VARARGS (child))
continue;
GPtrArray *children;
g_string_append_c (param_str, ' ');
children = girst_parser_object_get_children (params);
if (GIRST_IS_VARARGS (child))
for (guint i = 0; i < children->len; i++)
{
g_string_append (param_str, "...");
break;
}
GirstParserObject *child = g_ptr_array_index (children, i);
g_autofree gchar *c_type = NULL;
g_autofree gchar *name = NULL;
if (!GIRST_IS_PARAMETER (child) &&
!GIRST_IS_INSTANCE_PARAMETER (child) &&
!GIRST_IS_VARARGS (child))
continue;
g_object_get (child, "name", &name, NULL);
c_type = girst_parser_object_get_lhs_ctype (child);
g_string_append_c (param_str, ' ');
g_string_append_printf (param_str, "%s %s, ", c_type, name);
if (GIRST_IS_VARARGS (child))
{
g_string_append (param_str, "...");
break;
}
g_object_get (child, "name", &name, NULL);
c_type = girst_parser_object_get_lhs_ctype (child);
g_string_append_printf (param_str, "%s %s, ", c_type, name);
}
}
if (GIRST_IS_GLIB_SIGNAL (self))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment