From: Juerg Billeter Date: Sat, 19 Jan 2008 20:23:18 +0000 (+0000) Subject: support type_t naming convention X-Git-Tag: VALA_0_1_7~220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7bd7f62dfd3e2f7eb16630bd49ee7892b243827;p=thirdparty%2Fvala.git support type_t naming convention 2008-01-19 Juerg Billeter * gobject-introspection/scanner.c: support type_t naming convention svn path=/trunk/; revision=871 --- diff --git a/ChangeLog b/ChangeLog index af39ed4b1..97b0521d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-01-19 Jürg Billeter + + * gobject-introspection/scanner.c: support type_t naming convention + 2008-01-19 Jürg Billeter * vapigen/valagidlparser.vala: support hiding enums diff --git a/gobject-introspection/scanner.c b/gobject-introspection/scanner.c index 58885791a..0e45db7e3 100644 --- a/gobject-introspection/scanner.c +++ b/gobject-introspection/scanner.c @@ -762,6 +762,16 @@ g_igenerator_process_unregistered_struct_typedef (GIGenerator * igenerator, g_list_insert_sorted (igenerator->module->entries, ginode, (GCompareFunc) g_idl_node_cmp); lower_case_prefix = g_ascii_strdown (sym->ident, -1); + + /* support type_t naming convention */ + if (g_str_has_suffix (lower_case_prefix, "_t")) + { + char *tmp = lower_case_prefix; + tmp[strlen (tmp) - strlen ("_t")] = '\0'; + lower_case_prefix = str_replace (tmp, "_", ""); + g_free (tmp); + } + g_hash_table_insert (igenerator->type_map, sym->ident, ginode); g_hash_table_insert (igenerator->type_by_lower_case_prefix, lower_case_prefix, ginode);