config-parser: introduce new CONFIG_PARSER_PROTOTYPE() macro
authorLennart Poettering <lennart@poettering.net>
Tue, 22 May 2018 11:03:19 +0000 (13:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 May 2018 11:18:44 +0000 (13:18 +0200)
commit1f12b48a730bfbca991d0ae51e3a740d59faf201
treee1fc05a2f9a0d3faace4fad2522bcdeb398e8085
parent930362ab26afdd18fe22738cbfb1c374ae928c49
config-parser: introduce new CONFIG_PARSER_PROTOTYPE() macro

This builds on the previous GENERIC_PARSER_ARGS macro work. I think in
general it is a better idea to declare macros that generate full C
statements instead of just parts of them, hence, let's introduce
CONFIG_PARSER_PROTOTYPE() which defines a full C function prototype,
instead of the pre-existing way of defining the C function prototype
manually, but then using GENERIC_PARSER_ARGS to define its arguments.

This doesn't drop GENERIC_PARSER_ARGS though, but renames it to
CONFIG_PARSER_ARGUMENTS, and changes the ConfigParserCallback function
type to use it. The new name follows more closely how the other symbols
in the header are named.
src/shared/conf-parser.h