diff options
author | Lou Berger <lberger@labn.net> | 2018-04-12 02:12:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-12 02:12:25 +0200 |
commit | 0b984829be4b06ddd565cda2d8c1fd99bce540c1 (patch) | |
tree | 6bb63cd862b9b587ecf1284e25be9ee53e717d9a /lib/command.h | |
parent | Merge pull request #2052 from qlyoung/style (diff) | |
parent | doc: update style exceptions list (diff) | |
download | frr-0b984829be4b06ddd565cda2d8c1fd99bce540c1.tar.xz frr-0b984829be4b06ddd565cda2d8c1fd99bce540c1.zip |
Merge pull request #1989 from qlyoung/defpy-hidden
lib, python: DEFPY_ATTR, DEFPY_HIDDEN
Diffstat (limited to 'lib/command.h')
-rw-r--r-- | lib/command.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/command.h b/lib/command.h index 4bb57c77a..bb7781235 100644 --- a/lib/command.h +++ b/lib/command.h @@ -222,6 +222,13 @@ struct cmd_node { DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, 0, 0) \ funcdecl_##funcname +#define DEFPY_ATTR(funcname, cmdname, cmdstr, helpstr, attr) \ + DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, attr, 0) \ + funcdecl_##funcname + +#define DEFPY_HIDDEN(funcname, cmdname, cmdstr, helpstr) \ + DEFPY_ATTR(funcname, cmdname, cmdstr, helpstr, CMD_ATTR_HIDDEN) + #define DEFUN(funcname, cmdname, cmdstr, helpstr) \ DEFUN_CMD_FUNC_DECL(funcname) \ DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, 0, 0) \ @@ -299,6 +306,9 @@ struct cmd_node { #else /* VTYSH_EXTRACT_PL */ #define DEFPY(funcname, cmdname, cmdstr, helpstr) \ DEFUN(funcname, cmdname, cmdstr, helpstr) + +#define DEFPY_ATTR(funcname, cmdname, cmdstr, helpstr, attr) \ + DEFUN_ATTR(funcname, cmdname, cmdstr, helpstr, attr) #endif /* VTYSH_EXTRACT_PL */ /* Some macroes */ |