dect
/
asterisk
Archived
13
0
Fork 0

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
This commit is contained in:
russell 2010-09-04 18:10:46 +00:00
parent b7daa98b31
commit b08326e6b9
1 changed files with 4 additions and 0 deletions

View File

@ -183,9 +183,13 @@ struct ast_cli_entry {
AST_LIST_ENTRY(ast_cli_entry) list;
};
#if defined(__cplusplus) || defined(c_plusplus)
#define AST_CLI_DEFINE(fn, txt) { { "" }, txt, NULL, 0, NULL, NULL, 0, 0, NULL, fn }
#else
/* XXX the parser in gcc 2.95 gets confused if you don't put a space
* between the last arg before VA_ARGS and the comma */
#define AST_CLI_DEFINE(fn, txt , ... ) { .handler = fn, .summary = txt, ## __VA_ARGS__ }
#endif
/*!
* Helper function to generate cli entries from a NULL-terminated array.