Commit cd8afeef authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

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
parent 550962a1
2007-11-24 Jürg Billeter <j@bitron.ch>
* gobject-introspection/gen-introspect.c: avoid NULL function parameter
names
* vapigen/valagidlparser.vala: accept iconv_t
2007-11-23 Jürg Billeter <j@bitron.ch> 2007-11-23 Jürg Billeter <j@bitron.ch>
* configure.ac, gobject-introspection/Makefile.am, * configure.ac, gobject-introspection/Makefile.am,
......
...@@ -710,10 +710,15 @@ static void g_igenerator_process_function_symbol (GIGenerator *igenerator, CSymb ...@@ -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 = (GIdlNodeParam *) g_idl_node_new (G_IDL_NODE_PARAM);
gifunc->result->type = get_type_from_ctype (sym->base_type->base_type); gifunc->result->type = get_type_from_ctype (sym->base_type->base_type);
GList *param_l; 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; CSymbol *param_sym = param_l->data;
GIdlNodeParam *param = (GIdlNodeParam *) g_idl_node_new (G_IDL_NODE_PARAM); 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); param->type = get_type_from_ctype (param_sym->base_type);
gifunc->parameters = g_list_append (gifunc->parameters, param); gifunc->parameters = g_list_append (gifunc->parameters, param);
} }
......
...@@ -866,6 +866,8 @@ public class Vala.GIdlParser : CodeVisitor { ...@@ -866,6 +866,8 @@ public class Vala.GIdlParser : CodeVisitor {
type.type_name = "FileStream"; type.type_name = "FileStream";
} else if (n == "struct") { } else if (n == "struct") {
type.type_name = "pointer"; type.type_name = "pointer";
} else if (n == "iconv_t") {
type.type_name = "pointer";
} else if (n == "GType") { } else if (n == "GType") {
type.namespace_name = "GLib"; type.namespace_name = "GLib";
type.type_name = "Type"; type.type_name = "Type";
......
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