wmaker: replaced macro 'store_modifier' by an inline function, in X Modifier initiali...
commit34d82e5462996c4912f29d7470c3fdea10785e6f
authorChristophe CURIS <christophe.curis@free.fr>
Sun, 7 Dec 2014 16:10:19 +0000 (7 17:10 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Wed, 10 Dec 2014 10:19:18 +0000 (10 10:19 +0000)
treeaf3a03f63d409afa548eaf5975105ba87aea65ee
parentde00154fa171512532e44c706b6ed54e253c48cf
wmaker: replaced macro 'store_modifier' by an inline function, in X Modifier initialisation

A macro can be a source of problems, because the compiler has no type on
the arguments to make checks. Using an inline function allows to do those
checks, meaning clearer error messages, it provides clear info in case of
name collision, it is easier to maintain (no need for the hacky '\' for
multi-lines) and the scope of visibility can be controlled more easily (no
need for #undef).

The macro store_modifier had to face a slight change because its 2nd
parameter is used as a reference, which is now clearly visible in the
prototype of the function.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
src/Makefile.am
src/xmodifier.c