mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
This is a fix for 2 things: a problem Terry was having in OSX with null pointers, which was my fault, as I probably forgot to run the sed script last time I made mods. So, I moved the fix into the flex input itself. Then, I found when I used flex 2.5.33, that it was using __STDC_VERSION__, and that's not real good; so I added back in a DIFFERENT sed script to fix that little mess. Tested everything, a couple different ways. Hope I did no harm, at the least.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -99,6 +99,7 @@ static char *expr2_token_subst(const char *mess);
|
||||
%option bison-bridge
|
||||
%option bison-locations
|
||||
%option noyywrap
|
||||
%option noyyfree
|
||||
%x var trail
|
||||
|
||||
%%
|
||||
@@ -213,6 +214,14 @@ static char *expr2_token_subst(const char *mess);
|
||||
int ast_yyparse(void *); /* need to/should define this prototype for the call to yyparse */
|
||||
int ast_yyerror(const char *, YYLTYPE *, struct parse_io *); /* likewise */
|
||||
|
||||
void ast_yyfree(void *ptr, yyscan_t yyscanner)
|
||||
{
|
||||
if (ptr) /* the normal generated yyfree func just frees its first arg;
|
||||
this get complaints on some systems, as sometimes this
|
||||
arg is a nil ptr! It's usually not fatal, but is irritating! */
|
||||
free( (char *) ptr );
|
||||
}
|
||||
|
||||
int ast_expr(char *expr, char *buf, int length)
|
||||
{
|
||||
struct parse_io io;
|
||||
|
||||
Reference in New Issue
Block a user