[svn-commits] russell: branch group/asterisk-cpp r168451 - /team/group/asterisk-cpp/include...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jan 11 18:25:13 CST 2009


Author: russell
Date: Sun Jan 11 18:25:13 2009
New Revision: 168451

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168451
Log:
oops, forgot to check in AST_APP_OPTION fixes

Modified:
    team/group/asterisk-cpp/include/asterisk/app.h

Modified: team/group/asterisk-cpp/include/asterisk/app.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/app.h?view=diff&rev=168451&r1=168450&r2=168451
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/app.h (original)
+++ team/group/asterisk-cpp/include/asterisk/app.h Sun Jan 11 18:25:13 2009
@@ -371,6 +371,10 @@
   arguments supplied).
  */
 struct ast_app_option {
+	ast_app_option(char c, uint64_t f, unsigned int a = 0) :
+		optchar(c), flag(f) {}
+	/*! The character that represents this option */
+	char optchar;
 	/*! \brief The flag bit that represents this option. */
 	uint64_t flag;
 	/*! \brief The index of the entry in the arguments array
@@ -430,7 +434,7 @@
   \endcode
  */
 #define AST_APP_OPTIONS(holder, options...) \
-	static const struct ast_app_option holder[128] = options
+	static const struct ast_app_option holder[] = options
 
 /*!
   \brief Declares an application option that does not accept an argument.
@@ -438,8 +442,7 @@
   \param flagno The flag index to be set if this option is present
   \sa AST_APP_OPTIONS, ast_app_parse_options
  */
-#define AST_APP_OPTION(option, flagno) \
-	[option] = { .flag = flagno }
+#define AST_APP_OPTION(option, flagno) ast_app_option(option, flagno)
 
 /*!
   \brief Declares an application option that accepts an argument.
@@ -449,8 +452,7 @@
   be placed
   \sa AST_APP_OPTIONS, ast_app_parse_options
  */
-#define AST_APP_OPTION_ARG(option, flagno, argno) \
-	[option] = { .flag = flagno, .arg_index = argno + 1 }
+#define AST_APP_OPTION_ARG(option, flagno, argno) ast_app_option(option, flagno, argno + 1)
 
 /*!
   \brief Parses a string containing application options and sets flags/arguments.




More information about the svn-commits mailing list