@b4n commented on this pull request.
> @@ -241,6 +241,33 @@ void tm_ctags_clear_ignore_symbols(void)
}
+static gboolean replace_str(gchar **where, const gchar *what, gsize what_len,
+ const gchar *replacement, gsize replacement_len)
+{
+ if (where && *where)
+ {
+ gchar *pos = strstr(*where, what);
+
+ if (pos)
+ {
+ gsize where_len = strlen(*where);
+ gchar *str = g_malloc(where_len + (replacement_len -
what_len) + 1);
Sorry for the incorrect code, I actually *did* first try it using gsizes, and
possibly even forgot to re-test when restoring the guints because there are no
benefits to the gsizes as how the code is used (though arguably they *should*
be gsize, but who cares for a couple dozen-characters strings).
Anyway, I guess that those shenanigans are the price to pay for using a
fixed-size-integer language and refusing to use a higher level API because it
wastes a few dozen bytes :smiling_face_with_tear:
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3785#discussion_r1576958531
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3785/review/[email protected]>