aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-31 15:53:11 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-31 15:53:11 +0000
commit897b24fc914be5df112997d36fa3fb06db7a028f (patch)
tree53063039a33e9406e3a7d5970701fa987d282586 /include
parent9d7f6474219838cce4dd913ac0a3717fd8e142b4 (diff)
Add CV_STRINGFIELD() macro. This lets you set a config variable to a string field.
(from team/russell/chan_console) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95410 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/config.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asterisk/config.h b/include/asterisk/config.h
index 7a2d10135..fe9d49d30 100644
--- a/include/asterisk/config.h
+++ b/include/asterisk/config.h
@@ -397,6 +397,7 @@ int ast_parse_arg(const char *arg, enum ast_parse_flags flags,
#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)
}