projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
069584d
)
Add CV_STRINGFIELD() macro. This lets you set a config variable to a string field.
author
Russell Bryant
<russell@russellbryant.com>
Mon, 31 Dec 2007 15:53:11 +0000
(15:53 +0000)
committer
Russell Bryant
<russell@russellbryant.com>
Mon, 31 Dec 2007 15:53:11 +0000
(15:53 +0000)
(from team/russell/chan_console)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95410
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
include/asterisk/config.h
patch
|
blob
|
history
diff --git
a/include/asterisk/config.h
b/include/asterisk/config.h
index
7a2d101
..
fe9d49d
100644
(file)
--- 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)
}