[asterisk-dev] [Code Review] Modify standard argument parser not to consume characters in certain situations

Tilghman Lesher tlesher at digium.com
Fri Jul 24 10:22:29 CDT 2009



> On 2009-07-24 10:10:11, Mark Michelson wrote:
> > /trunk/include/asterisk/app.h, line 418
> > <https://reviewboard.asterisk.org/r/316/diff/1/?file=5975#file5975line418>
> >
> >     Why is this macro needed? Couldn't you just keep the old four-argument ast_app_separate_args function around instead?

I was thinking more along the lines of reducing needless stack frame usage.  The old 4-arg function is around for ABI-compat, but I'd prefer that when you compile new programs, you don't get 2 stack frames where there needs to be only 1.


- Tilghman


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/316/#review1001
-----------------------------------------------------------


On 2009-07-23 17:13:56, Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/316/
> -----------------------------------------------------------
> 
> (Updated 2009-07-23 17:13:56)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> The current standard argument parser consumes quotes and backslashes.  Usually, this should only occur once per argument line, which is problematic if the line contains multiple sets of data, which need to be parsed separately.  This patch changes the standard argument parser to permit recognizing special delimiters while not consuming them.
> 
> 
> This addresses bug 15557.
>     https://issues.asterisk.org/view.php?id=15557
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_stack.c 208150 
>   /trunk/include/asterisk/app.h 208150 
>   /trunk/main/app.c 208150 
> 
> Diff: https://reviewboard.asterisk.org/r/316/diff
> 
> 
> Testing
> -------
> 
> An example of parsing is given in issue 15557 , and this change has been tested to verify that Macro argument passing and Gosub argument passing now work in a similar fashion.
> 
> 
> Thanks,
> 
> Tilghman
> 
>




More information about the asterisk-dev mailing list