[svn-commits] russell: branch 1.8 r285057 - /branches/1.8/include/asterisk/cli.h

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Sep 4 13:08:26 CDT 2010


Author: russell
Date: Sat Sep  4 13:08:19 2010
New Revision: 285057

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=285057
Log:
Add a C++ compatible version of AST_CLI_DEFINE().

Modified:
    branches/1.8/include/asterisk/cli.h

Modified: branches/1.8/include/asterisk/cli.h
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/include/asterisk/cli.h?view=diff&rev=285057&r1=285056&r2=285057
==============================================================================
--- branches/1.8/include/asterisk/cli.h (original)
+++ branches/1.8/include/asterisk/cli.h Sat Sep  4 13:08:19 2010
@@ -183,9 +183,13 @@
 	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.




More information about the svn-commits mailing list