@techee commented on this pull request.
- if (*header == NULL && g_strcmp0(hdr_comps[0], src_comps[0]) == 0) - *header = hdr; - g_hash_table_add(includes, hdr); - g_strfreev(hdr_comps); + for (j = 0; j < tm_files->len; j++) + { + TMSourceFile *hdr = tm_files->pdata[j]; + gchar **hdr_comps = g_strsplit(hdr->short_name, ".", 2); + + if (g_strcmp0(hdr_comps[0], src_comps[0]) == 0)
The inner loop still adds to the includes hash table but it doesn't need to deal with the header candidates.
Yeah, got it now, fixed in the last commit.
FWIW, we will probably bump GTK dependency to 3.24 soon and then we also get glib 2.54+ (which is a bit older isn't it?).
That would fix the problem. 2.54 is from 2017.