summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 3293c4862d..31c6f01d56 100644
--- a/scope.c
+++ b/scope.c
@@ -504,6 +504,14 @@ Perl_save_freesv(pTHX_ SV *sv)
}
void
+Perl_save_mortalizesv(pTHX_ SV *sv)
+{
+ SSCHECK(2);
+ SSPUSHPTR(sv);
+ SSPUSHINT(SAVEt_MORTALIZESV);
+}
+
+void
Perl_save_freeop(pTHX_ OP *o)
{
SSCHECK(2);
@@ -803,6 +811,10 @@ Perl_leave_scope(pTHX_ I32 base)
ptr = SSPOPPTR;
SvREFCNT_dec((SV*)ptr);
break;
+ case SAVEt_MORTALIZESV:
+ ptr = SSPOPPTR;
+ sv_2mortal((SV*)ptr);
+ break;
case SAVEt_FREEOP:
ptr = SSPOPPTR;
if (PL_comppad)