chiark / gitweb /
config-parser: introduce new CONFIG_PARSER_PROTOTYPE() macro
authorLennart Poettering <lennart@poettering.net>
Tue, 22 May 2018 11:03:19 +0000 (13:03 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commit6945d41cc2ac78391d636f5278fd6039c884d21b
tree368589a7e37605b222f06dfd7452416cf20bfac5
parent1c17354411d00a0e8929ef6caac78ea40c7510fc
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