Rename both scope and var_type of anonymous types
In addition to scope, anonymous type can appear also inside var_type which should be renamed as well.
Fixes #3717.
I tested our glfw build with this patch and it became perfectly reproducible + deterministic.
Thanks a lot.
When will this be merged?
@b4n Does it look OK to you?
We have to rename the anonymous tag name both in scope and var_type so I moved the renaming to a separate function and call the function both on scope and var_type.
@b4n Thanks for the review! I've just re-pushed the version with the changes you suggested.
I had to make one more change, replace guint with gsize in what_len and replacement_len:
static gboolean replace_str(gchar **where, const gchar *what, gsize what_len,
const gchar *replacement, gsize replacement_len)
because otherwise
gchar *str = g_malloc(where_len + (replacement_len - what_len) + 1);
may underflow.
Interestingly, only meson unit tests failed and not the autotools ones - not sure why.