[Github-comments] [geany/geany] Improve handling of anonymous tags (PR #3059)

Jiří Techet notifications at xxxxx
Mon Dec 20 20:57:30 UTC 2021


@techee 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);

Yes, but then you have to zero it manually (which will be very fast but you will have to do it every time instead of lazily like now). No problem changing it but I think it's about the same like the current code.

The `gchar` is definitely my error, I got confused by that 256 value, will correct that.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3059#discussion_r772663619
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3059/review/836807864 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211220/e2fb61bc/attachment.htm>


More information about the Github-comments mailing list