/* perly.c
*
- * Copyright (c) 2004, 2005, 2006 Larry Wall and others
+ * Copyright (c) 2004, 2005, 2006, 2007, by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
PerlIO_printf(Perl_debug_log, "\nindex:");
for (ps = min; ps <= parser->ps; ps++)
- PerlIO_printf(Perl_debug_log, " %8d", ps - parser->stack);
+ PerlIO_printf(Perl_debug_log, " %8d", (int)(ps - parser->stack));
PerlIO_printf(Perl_debug_log, "\nstate:");
for (ps = min; ps <= parser->ps; ps++)
{
S_clear_yystack(aTHX_ parser);
Safefree(parser->stack);
+ Safefree(parser->lex_brackstack);
+ Safefree(parser->lex_casestack);
PL_parser = parser->old_parser;
+ Safefree(parser);
}
#endif
ps = parser->ps;
ENTER; /* force parser free before we return */
- SAVEDESTRUCTOR_X(Perl_parser_free, (void*) parser);
+ SAVEPARSER(parser);
/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate. |
/* grow the stack? We always leave 1 spare slot,
* in case of a '' -> 'foo' reduction */
- if (size >= parser->stack_size - 1) {
+ if (size >= (size_t)parser->stack_size - 1) {
/* this will croak on insufficient memory */
parser->stack_size *= 2;
Renew(parser->stack, parser->stack_size, yy_stack_frame);