mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@100264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -275,7 +275,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.
|
||||
@@ -288,7 +288,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
|
||||
|
Reference in New Issue
Block a user