[asterisk-commits] russell: trunk r95410 - /trunk/include/asterisk/config.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 31 09:53:11 CST 2007


Author: russell
Date: Mon Dec 31 09:53:11 2007
New Revision: 95410

URL: http://svn.digium.com/view/asterisk?view=rev&rev=95410
Log:
Add CV_STRINGFIELD() macro.  This lets you set a config variable to a string field.

(from team/russell/chan_console)

Modified:
    trunk/include/asterisk/config.h

Modified: trunk/include/asterisk/config.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/config.h?view=diff&rev=95410&r1=95409&r2=95410
==============================================================================
--- trunk/include/asterisk/config.h (original)
+++ trunk/include/asterisk/config.h Mon Dec 31 09:53:11 2007
@@ -397,6 +397,7 @@
 #define CV_UINT(__x, __dst)	CV_F(__x, (__dst) = strtoul(__val, NULL, 0) )
 #define CV_STR(__x, __dst)	CV_F(__x, ast_copy_string(__dst, __val, sizeof(__dst)))
 #define CV_DSTR(__x, __dst)	CV_F(__x, if (__dst) ast_free(__dst); __dst = ast_strdup(__val))
+#define CV_STRFIELD(__x, __obj, __field) CV_F(__x, ast_string_field_set(__obj, __field, __val))
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }




More information about the asterisk-commits mailing list