On Thu, May 15, 2014 at 02:58:28PM +0200, Jacob Erlbeck wrote:
Why inline? We basically need the addresses of these
functions.
Like it is done for most methods defined inside a header file. But
you are right, we do not need the inline here.
It's quite some code duplication. What about
something like the
following (even if the resulting 'forward' declarations are somewhat
senseless). This would even work with the ';' in the 'calling' code:
#define CTRL_CMD_DEFINE_RO(cmdname, cmdstr) \
...
CTRL_CMD_DEFINE(cmdname, cmdstr)
Good idea, I have done that and cleaned it up a bit further.