Fix building MAD with C++ - a MAD_PV of "" is illegal, as it will be free()d.
Nicholas Clark [Thu, 24 Sep 2009 13:27:38 +0000 (14:27 +0100)]
perly.act
perly.y

index 864fd61..8745ab6 100644 (file)
--- a/perly.act
+++ b/perly.act
@@ -630,7 +630,7 @@ case 2:
                          token_getmad((ps[(7) - (7)].val.i_tkval),(yyval.opval),';');
                          if (PL_parser->rsfp_filters &&
                                      AvFILLp(PL_parser->rsfp_filters) >= 0)
-                             append_madprops(newMADPROP('!', MAD_PV, "", 0), (yyval.opval), 0);
+                             append_madprops(newMADPROP('!', MAD_NULL, NULL, 0), (yyval.opval), 0);
 #else
                          utilize(IVAL((ps[(1) - (7)].val.i_tkval)), (ps[(2) - (7)].val.ival), (ps[(4) - (7)].val.opval), (ps[(5) - (7)].val.opval), (ps[(6) - (7)].val.opval));
                          (yyval.opval) = (OP*)NULL;
diff --git a/perly.y b/perly.y
index bcdd434..df5cf46 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -656,7 +656,7 @@ use :       USE startsub
                          token_getmad($7,$$,';');
                          if (PL_parser->rsfp_filters &&
                                      AvFILLp(PL_parser->rsfp_filters) >= 0)
-                             append_madprops(newMADPROP('!', MAD_PV, "", 0), $$, 0);
+                             append_madprops(newMADPROP('!', MAD_NULL, NULL, 0), $$, 0);
 #else
                          utilize(IVAL($1), $2, $4, $5, $6);
                          $$ = (OP*)NULL;