<p><b>@codebrainz</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2270#discussion_r317370461">src/build.c</a>:</p>
<pre style='color:#555'>> @@ -2577,15 +2565,20 @@ void build_save_menu(GKeyFile *config, gpointer ptr, GeanyBuildSource src)
                                g_key_file_remove_key(config, build_grp_name, "error_regex", NULL);
                        if (pj->priv->build_filetypes_list != NULL)
                        {
-                               data.config = config;
-                               data.ft_names = g_ptr_array_new();
-                               g_ptr_array_foreach(pj->priv->build_filetypes_list, foreach_project_filetype, (gpointer)(&data));
-                               if (data.ft_names->pdata != NULL)
+                               GPtrArray *ft_names = g_ptr_array_new();
+                               guint i;
+                               
+                               foreach_ptr_array(ft, i, pj->priv->build_filetypes_list)
</pre>
<blockquote>
<p>But what about things that people often get wrong, like not checking doc->is_valid, I think the foreach_document macro is worth having. is_valid is a Geany-specific thing, so it's easy to justify a macro here. Sure, make it upper-case though.</p>
</blockquote>
<p>If there's an actual reason for it, sure. But what is the reason we keep invalid documents around? If there is a good reason to do that (like not premature optimization), I would tend to agree such a macro may be useful, but probably located in the <code>document.h</code> file and as we all agree upper-case.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2270?email_source=notifications&email_token=AAIOWJ4ZIO6MOXQFK5XNYRTQGF3KBA5CNFSM4IOW2V4KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS6CBY#discussion_r317370461">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJYTS6ONU55N2PIFFEDQGF3KBANCNFSM4IOW2V4A">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ2PSPDZAVP2RK5EZMDQGF3KBA5CNFSM4IOW2V4KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS6CBY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2270?email_source=notifications\u0026email_token=AAIOWJ4ZIO6MOXQFK5XNYRTQGF3KBA5CNFSM4IOW2V4KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS6CBY#discussion_r317370461",
"url": "https://github.com/geany/geany/pull/2270?email_source=notifications\u0026email_token=AAIOWJ4ZIO6MOXQFK5XNYRTQGF3KBA5CNFSM4IOW2V4KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS6CBY#discussion_r317370461",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>