mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Merged revisions 97889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97889 | murf | 2008-01-10 14:37:10 -0700 (Thu, 10 Jan 2008) | 1 line Applied the same fixes for ael.flex as was done in 97849 for ast_expr2.fl; overrode the normally generate yyfree func with our own version that checks the pointer for non-null before passing to free(). Also takes care of a little problem with 2.5.33 and the use of the __STDC_VERSION__ macro. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -35,6 +35,10 @@
|
||||
%option prefix="ael_yy"
|
||||
%option noyywrap 8bit
|
||||
|
||||
/* yyfree normally just frees its arg. It can be null sometimes,
|
||||
which some systems will complain about, so, we'll define our own version */
|
||||
%option noyyfree
|
||||
|
||||
/* batch gives a bit more performance if we are using it in
|
||||
* a non-interactive mode. We probably don't care much.
|
||||
*/
|
||||
@@ -479,6 +483,12 @@ static void pbcpush(char x)
|
||||
pbcstack[pbcpos++] = x;
|
||||
}
|
||||
|
||||
void ael_yyfree(void *ptr, yyscan_t yyscanner)
|
||||
{
|
||||
if (ptr)
|
||||
free( (char*) ptr );
|
||||
}
|
||||
|
||||
static int pbcpop(char x)
|
||||
{
|
||||
if ( ( x == ')' && pbcstack[pbcpos-1] == '(' )
|
||||
|
Reference in New Issue
Block a user