From ebafeae7404ab232f258bc8cdedeb751e7c60ecb Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Thu, 5 Nov 1998 02:07:54 +0000 Subject: [PATCH] fix a location affected by change#2191, add note about POPSTACK p4raw-link: @2191 on //depot/perl: de616352556f5da70790ceef0ca8b92726d7761a p4raw-id: //depot/perl@2196 --- cop.h | 2 ++ gv.c | 1 + pp_ctl.c | 1 + 3 files changed, 4 insertions(+) diff --git a/cop.h b/cop.h index d3f7194..1ef5e0c 100644 --- a/cop.h +++ b/cop.h @@ -357,6 +357,8 @@ typedef struct stackinfo PERL_SI; #define PUSHSTACK PUSHSTACKi(PERLSI_UNKNOWN) +/* POPSTACK works with PL_stack_sp, so any local sp modifications may + * need to be flushed with a PUTBACK */ #define POPSTACK \ STMT_START { \ djSP; \ diff --git a/gv.c b/gv.c index 94bf499..4cef56d 100644 --- a/gv.c +++ b/gv.c @@ -1437,6 +1437,7 @@ amagic_call(SV *left, SV *right, int method, int flags) SPAGAIN; res=POPs; + PUTBACK; POPSTACK; CATCH_SET(oldcatch); diff --git a/pp_ctl.c b/pp_ctl.c index c9ccb3a..0f02c66 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -911,6 +911,7 @@ PP(pp_sort) qsortsv((myorigmark+1), max, FUNC_NAME_TO_PTR(sortcv)); POPBLOCK(cx,PL_curpm); + PL_stack_sp = newsp; POPSTACK; CATCH_SET(oldcatch); } -- 2.7.4