[Github-comments] [geany/geany] Improve handling of anonymous tags (PR #3059)
Jiří Techet
notifications at xxxxx
Mon Dec 20 15:47:04 UTC 2021
@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).
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3059#discussion_r772472611
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3059/review/836542249 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211220/af50d769/attachment-0001.htm>
More information about the Github-comments
mailing list