diff options
author | Juerg Billeter <j@bitron.ch> | 2008-01-19 20:23:18 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2008-01-19 20:23:18 +0000 |
commit | d7bd7f62dfd3e2f7eb16630bd49ee7892b243827 (patch) | |
tree | 48720488e487cf7780442369dea28875e6243c85 /gobject-introspection | |
parent | 1251f71eda73cbb5f0f316e77679668604469824 (diff) | |
download | vala-d7bd7f62dfd3e2f7eb16630bd49ee7892b243827.tar.gz |
support type_t naming convention
2008-01-19 Juerg Billeter <j@bitron.ch>
* gobject-introspection/scanner.c: support type_t naming convention
svn path=/trunk/; revision=871
Diffstat (limited to 'gobject-introspection')
-rw-r--r-- | gobject-introspection/scanner.c | 10 |
1 files changed, 10 insertions, 0 deletions
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); |