fix a location affected by change#2191, add note about POPSTACK
authorGurusamy Sarathy <gsar@cpan.org>
Thu, 5 Nov 1998 02:07:54 +0000 (02:07 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Thu, 5 Nov 1998 02:07:54 +0000 (02:07 +0000)
p4raw-link: @2191 on //depot/perl: de616352556f5da70790ceef0ca8b92726d7761a

p4raw-id: //depot/perl@2196

cop.h
gv.c
pp_ctl.c

diff --git a/cop.h b/cop.h
index d3f7194..1ef5e0c 100644 (file)
--- 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 (file)
--- 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);
 
index c9ccb3a..0f02c66 100644 (file)
--- 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);
        }