From: Gurusamy Sarathy Date: Thu, 5 Nov 1998 02:07:54 +0000 (+0000) Subject: fix a location affected by change#2191, add note about POPSTACK X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ebafeae7404ab232f258bc8cdedeb751e7c60ecb;p=p5sagit%2Fp5-mst-13.2.git fix a location affected by change#2191, add note about POPSTACK p4raw-link: @2191 on //depot/perl: de616352556f5da70790ceef0ca8b92726d7761a p4raw-id: //depot/perl@2196 --- 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); }