[Github-comments] [geany/geany] build.c: ASSIGNIF -> assign_cmd (#2256)
Nick Treleaven
notifications at xxxxx
Mon Aug 12 16:36:05 UTC 2019
ntrel commented on this pull request.
> @@ -2291,6 +2291,22 @@ static void build_load_menu_grp(GKeyFile *config, GeanyBuildCommand **dst, gint
}
+/* set GeanyBuildCommand if it doesn't already exist and there is a command */
+static void assign_cmd(GeanyBuildCommand *type, guint id,
+ const gchar *label, gchar *value)
+{
+ if (!EMPTY(value) && ! type[GBO_TO_CMD(id)].exists)
+ {
+ type[GBO_TO_CMD(id)].exists = TRUE;
+ SETPTR(type[GBO_TO_CMD(id)].label, g_strdup(label));
+ SETPTR(type[GBO_TO_CMD(id)].command, value);
+ SETPTR(type[GBO_TO_CMD(id)].working_dir, NULL);
+ type[GBO_TO_CMD(id)].old = TRUE;
+ }
+ else
+ g_free(value);
I don't think that helps readability here. If you want to make a pull against my branch I'll merge it though.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2256#discussion_r313016458
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190812/1f7f9713/attachment.html>
More information about the Github-comments
mailing list