@techee commented on this pull request.
/* set the name of the original anon tag and pretend
+ * it wasn't a anon tag */ + tag->name = g_strdup(typedef_tag->name); + tag->flags &= ~tm_tag_flag_anon_t; + new_name = tag->name; + /* the typedef tag will be removed */ + g_ptr_array_add(removed_typedefs, GUINT_TO_POINTER(j)); + } + } + } + + /* there's no typedef name for the anon tag so let's generate one */ + if (!new_name) + { + gchar buf[50]; + guint anon_counter = GPOINTER_TO_UINT(g_hash_table_lookup(anon_counter_table, kind_name));
Good point, will change. I was also thinking I could allocate the `removed_typedefs` GPtrArray lazily if needed so it isn't allocated every time (and unnecessarily for most languages).