Fixed leak in lexer allocation, thanks to mmass@gmail.com
Issue #142 git-svn-id: http://picoc.googlecode.com/svn/trunk@585 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
a8891aa743
commit
62fc9d4f9f
5
lex.c
5
lex.c
|
@ -107,7 +107,12 @@ void LexInit(Picoc *pc)
|
||||||
/* deallocate */
|
/* deallocate */
|
||||||
void LexCleanup(Picoc *pc)
|
void LexCleanup(Picoc *pc)
|
||||||
{
|
{
|
||||||
|
int Count;
|
||||||
|
|
||||||
LexInteractiveClear(pc, NULL);
|
LexInteractiveClear(pc, NULL);
|
||||||
|
|
||||||
|
for (Count = 0; Count < sizeof(ReservedWords) / sizeof(struct ReservedWord); Count++)
|
||||||
|
TableDelete(pc, &pc->ReservedWordTable, TableStrRegister(pc, ReservedWords[Count].Word));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if a word is a reserved word - used while scanning */
|
/* check if a word is a reserved word - used while scanning */
|
||||||
|
|
Loading…
Reference in a new issue