[PATCH] ctrl: Introduce a macro for read-only attributes and use it

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Thu May 15 13:58:11 UTC 2014


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.




More information about the OpenBSC mailing list