Skip to content

Commit b08326e

Browse files
author
russell
committed
Merged revisions 285057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r285057 | russell | 2010-09-04 13:08:19 -0500 (Sat, 04 Sep 2010) | 2 lines Add a C++ compatible version of AST_CLI_DEFINE(). ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@285058 f38db490-d61c-443f-a65b-d21fe96a405b
1 parent b7daa98 commit b08326e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/asterisk/cli.h

+4
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,13 @@ struct ast_cli_entry {
183183
AST_LIST_ENTRY(ast_cli_entry) list;
184184
};
185185

186+
#if defined(__cplusplus) || defined(c_plusplus)
187+
#define AST_CLI_DEFINE(fn, txt) { { "" }, txt, NULL, 0, NULL, NULL, 0, 0, NULL, fn }
188+
#else
186189
/* XXX the parser in gcc 2.95 gets confused if you don't put a space
187190
* between the last arg before VA_ARGS and the comma */
188191
#define AST_CLI_DEFINE(fn, txt , ... ) { .handler = fn, .summary = txt, ## __VA_ARGS__ }
192+
#endif
189193

190194
/*!
191195
* Helper function to generate cli entries from a NULL-terminated array.

0 commit comments

Comments
 (0)