Skip to content

Commit

Permalink
Memory leaks - compiler
Browse files Browse the repository at this point in the history
* compile_string (called by eval aka compreg/compile) didn't free
  the parser state, this is fixed  


git-svn-id: https://svn.parrot.org/parrot/trunk@11700 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
Leopold Toetsch committed Feb 22, 2006
1 parent ad70f18 commit 725e498
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 164 deletions.
1 change: 1 addition & 0 deletions compilers/imcc/imc.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ typedef enum _AsmState {
} AsmState;

PARROT_API void IMCC_push_parser_state(Interp*);
PARROT_API void IMCC_pop_parser_state(Interp*);

typedef struct _imc_info_t {
struct _imc_info_t *prev;
Expand Down
6 changes: 6 additions & 0 deletions compilers/imcc/imcc.l
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,12 @@ pop_parser_state(Interp* interp)
IMCC_INFO(interp)->state = (struct parser_state_t *) frames;
}

void
IMCC_pop_parser_state(Interp* interp)
{
pop_parser_state(interp);
}

void
compile_file(Interp *interp, FILE *file)
{
Expand Down
Loading

0 comments on commit 725e498

Please sign in to comment.