[Github-comments] [geany/geany] build.c: Replace 3 unhygienic set_key_* macros with 2 functions (#2286)

Nick Treleaven notifications at xxxxx
Thu Sep 5 15:45:48 UTC 2019


The macros were used to generate the key string to use in the [build-menu] setting of each keyfile.
* Use one function to set both the group and command index, encapsulating the `sprintf(cmdbuf` code.
* Use a separate function to set the field of the command, as this is needed 3 times per command. This takes a GEANY_BC_* value instead of a string literal for clarity.
* Merge 2 for loops.

(This also makes 2 global scope string arrays into local arrays).
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/2286

-- Commit Summary --

  * build.c: Replace unhygienic set_key_* macros with 2 functions

-- File Changes --

    M src/build.c (74)

-- Patch Links --

https://github.com/geany/geany/pull/2286.patch
https://github.com/geany/geany/pull/2286.diff

-- 
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/2286
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190905/0397cee4/attachment.html>


More information about the Github-comments mailing list