Re-order Perl_save_delete() to PTR, INT, PTR.
Nicholas Clark [Mon, 1 Dec 2008 11:54:42 +0000 (11:54 +0000)]
p4raw-id: //depot/perl@34967

scope.c
sv.c

diff --git a/scope.c b/scope.c
index 7845fc5..df661ae 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -506,8 +506,8 @@ Perl_save_delete(pTHX_ HV *hv, char *key, I32 klen)
     PERL_ARGS_ASSERT_SAVE_DELETE;
 
     SSCHECK(4);
-    SSPUSHINT(klen);
     SSPUSHPTR(key);
+    SSPUSHINT(klen);
     SSPUSHPTR(SvREFCNT_inc_simple(hv));
     SSPUSHINT(SAVEt_DELETE);
 }
@@ -861,8 +861,9 @@ Perl_leave_scope(pTHX_ I32 base)
        case SAVEt_DELETE:
            ptr = SSPOPPTR;
            hv = MUTABLE_HV(ptr);
+           i = SSPOPINT;
            ptr = SSPOPPTR;
-           (void)hv_delete(hv, (char*)ptr, (I32)SSPOPINT, G_DISCARD);
+           (void)hv_delete(hv, (char*)ptr, i, G_DISCARD);
            SvREFCNT_dec(hv);
            Safefree(ptr);
            break;
diff --git a/sv.c b/sv.c
index 2a4c581..3a3f46e 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -11261,9 +11261,11 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
        case SAVEt_DELETE:
            hv = (const HV *)POPPTR(ss,ix);
            TOPPTR(nss,ix) = hv_dup_inc(hv, param);
+           i = POPINT(ss,ix);
+           TOPINT(nss,ix) = i;
            c = (char*)POPPTR(ss,ix);
            TOPPTR(nss,ix) = pv_dup_inc(c);
-           /* fall through */
+           break;
        case SAVEt_STACK_POS:           /* Position on Perl stack */
            i = POPINT(ss,ix);
            TOPINT(nss,ix) = i;