summaryrefslogtreecommitdiff
path: root/gobject-introspection
diff options
context:
space:
mode:
authorJuerg Billeter <j@bitron.ch>2007-11-24 09:41:54 +0000
committerJürg Billeter <juergbi@src.gnome.org>2007-11-24 09:41:54 +0000
commitcd8afeef2496c28eda8086784fa2afd73f9917e3 (patch)
tree462921c34b6eed8962722fe817b14e910545d5b2 /gobject-introspection
parent550962a14c5ca404072e5e2b71eefe0715c2df2b (diff)
downloadvala-cd8afeef2496c28eda8086784fa2afd73f9917e3.tar.gz
avoid NULL function parameter names
2007-11-24 Juerg Billeter <j@bitron.ch> * gobject-introspection/gen-introspect.c: avoid NULL function parameter names * vapigen/valagidlparser.vala: accept iconv_t svn path=/trunk/; revision=714
Diffstat (limited to 'gobject-introspection')
-rw-r--r--gobject-introspection/gen-introspect.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gobject-introspection/gen-introspect.c b/gobject-introspection/gen-introspect.c
index 865de37a0..edd64ab5d 100644
--- a/gobject-introspection/gen-introspect.c
+++ b/gobject-introspection/gen-introspect.c
@@ -710,10 +710,15 @@ static void g_igenerator_process_function_symbol (GIGenerator *igenerator, CSymb
gifunc->result = (GIdlNodeParam *) g_idl_node_new (G_IDL_NODE_PARAM);
gifunc->result->type = get_type_from_ctype (sym->base_type->base_type);
GList *param_l;
- for (param_l = sym->base_type->child_list; param_l != NULL; param_l = param_l->next) {
+ int i;
+ for (param_l = sym->base_type->child_list, i = 1; param_l != NULL; param_l = param_l->next, i++) {
CSymbol *param_sym = param_l->data;
GIdlNodeParam *param = (GIdlNodeParam *) g_idl_node_new (G_IDL_NODE_PARAM);
- param->node.name = param_sym->ident;
+ if (param_sym->ident == NULL) {
+ param->node.name = g_strdup_printf ("p%d", i);
+ } else {
+ param->node.name = param_sym->ident;
+ }
param->type = get_type_from_ctype (param_sym->base_type);
gifunc->parameters = g_list_append (gifunc->parameters, param);
}