fix destructor for pval objects (thanks to Steve Murphy);

rearrange initial part of ael.flex for flexibility.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2006-04-27 21:09:52 +00:00
parent bfcab55f49
commit 304fbbd1b6
4 changed files with 507 additions and 636 deletions

View File

@@ -136,15 +136,11 @@ static pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last);
/*
* declare destructors for objects.
* The former is for pval, the latter for strings.
* NOTE: we must not have a destructor for a 'file' object.
*/
%destructor {
/* XXX i think the destructor must be called always */
if (1 /* yymsg[0] != 'C' */) {
destroy_pval($$);
prev_word=0;
} else {
printf("Cleanup destructor called for pvals\n");
}
destroy_pval($$);
prev_word=0;
} includes includeslist switchlist eswitches switches
macro_statement macro_statements case_statement case_statements
eval_arglist application_call application_call_head