fix -Mad build breakage
[p5sagit/p5-mst-13.2.git] / perly.c
diff --git a/perly.c b/perly.c
index 36f78a3..94da31f 100644 (file)
--- a/perly.c
+++ b/perly.c
@@ -195,7 +195,7 @@ S_clear_yystack(pTHX_  const yy_parser *parser)
     yy_stack_frame *ps     = parser->ps;
     int i;
 
-    if (ps == parser->stack)
+    if (!parser->stack || ps == parser->stack)
        return;
 
     YYDPRINTF ((Perl_debug_log, "clearing the parse stack\n"));
@@ -296,6 +296,7 @@ S_clear_yystack(pTHX_  const yy_parser *parser)
 
 /* delete a parser object */
 
+#ifndef PERL_IN_MADLY_C
 void
 Perl_parser_free(pTHX_  const yy_parser *parser)
 {
@@ -303,7 +304,7 @@ Perl_parser_free(pTHX_  const yy_parser *parser)
     Safefree(parser->stack);
     PL_parser = parser->old_parser;
 }
-
+#endif
 
 /*----------.
 | yyparse.  |