use Config;
-plan tests => 107;
+plan tests => 108;
# run some code N times. If the number of SVs at the end of loop N is
# greater than (N-1)*delta at the end of loop 1, we've got a leak
}
eleak(2, 0, "\"\$\0\356\"", 'qq containing $ <null> something');
eleak(2, 0, 'END OF TERMS AND CONDITIONS', 'END followed by words');
+eleak(2, 0, "+ + +;qq|\\N{a}|"x10,'qq"\N{a}" after errors');
eleak(2, 0, "qq|\\c|;"x10, '"too many errors" from qq"\c"');
$::TODO = 'still leaks';
eleak(2, 0, "qq|\\N{%}|"x10, '"too many errors" from qq"\N{%}"');
}
}
-/* Either returns sv, or mortalizes sv and returns a new SV*.
+/* Either returns sv, or mortalizes/frees sv and returns a new SV*.
Best used as sv=new_constant(..., sv, ...).
If s, pv are NULL, calls subroutine with one argument,
and <type> is used with error messages only.
/* charnames doesn't work well if there have been errors found */
if (PL_error_count > 0 && strEQ(key,"charnames"))
+ {
+ SvREFCNT_dec_NN(sv);
return &PL_sv_undef;
+ }
if (!table
|| ! (PL_hints & HINT_LOCALIZE_HH)