[Github-comments] [geany/geany] Improve handling of anonymous tags (PR #3059)
Thomas Martitz
notifications at xxxxx
Mon Dec 20 21:10:08 UTC 2021
@kugel- commented on this pull request.
> + if (!removed_typedefs)
+ removed_typedefs = g_ptr_array_new();
+ 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;
+ const gchar *kind_name = tm_ctags_get_kind_name(kind, tag->lang);
+
+ if (!anon_counter_table)
+ anon_counter_table = g_new0(gchar, 256);
I don't feel strong about array vs. g_new0, do as you chose (hint: zero-initialization of arrays: `gint foo[N] = {0}`)
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3059#discussion_r772670088
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3059/review/836816837 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211220/c7559de9/attachment.htm>
More information about the Github-comments
mailing list