aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-24 22:01:55 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-24 22:01:55 +0000
commit7fc246af66599ce690b0d39cdcce650e0d1b08b1 (patch)
treebbd6ae38ece04319155d6e8b2d3820852353521c
parent27ac5568e11fda8041d400dda48ee04c948394ca (diff)
Merged revisions 100264 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r100264 | kpfleming | 2008-01-24 15:57:41 -0600 (Thu, 24 Jan 2008) | 2 lines make these macros not assume that the only other field in the structure is 'argc'... this is true when someone uses AST_DECLARE_APP_ARGS, but it's perfectly reasonable to define your own structure as long as it has the right fields ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@100265 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--include/asterisk/app.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h
index 5be236608..db5194bf1 100644
--- a/include/asterisk/app.h
+++ b/include/asterisk/app.h
@@ -298,7 +298,7 @@ int ast_app_group_list_unlock(void);
the argc argument counter field.
*/
#define AST_STANDARD_APP_ARGS(args, parse) \
- args.argc = ast_app_separate_args(parse, ',', args.argv, (sizeof(args) - sizeof(args.argc)) / sizeof(args.argv[0]))
+ args.argc = ast_app_separate_args(parse, ',', args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
/*!
\brief Performs the 'nonstandard' argument separation process for an application.
@@ -311,7 +311,7 @@ int ast_app_group_list_unlock(void);
the argc argument counter field.
*/
#define AST_NONSTANDARD_APP_ARGS(args, parse, sep) \
- args.argc = ast_app_separate_args(parse, sep, args.argv, (sizeof(args) - sizeof(args.argc)) / sizeof(args.argv[0]))
+ args.argc = ast_app_separate_args(parse, sep, args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
/*!
\brief Separate a string into arguments in an array