This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
For SAVEt_BOOL, save the value with the type.
[perl5.git] / scope.c
diff --git a/scope.c b/scope.c
index 5b7b614..8a769a3 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -373,10 +373,9 @@ Perl_save_bool(pTHX_ bool *boolp)
 
     PERL_ARGS_ASSERT_SAVE_BOOL;
 
 
     PERL_ARGS_ASSERT_SAVE_BOOL;
 
-    SSCHECK(3);
-    SSPUSHBOOL(*boolp);
+    SSCHECK(2);
     SSPUSHPTR(boolp);
     SSPUSHPTR(boolp);
-    SSPUSHUV(SAVEt_BOOL);
+    SSPUSHUV(SAVEt_BOOL | (*boolp << 8));
 }
 
 void
 }
 
 void
@@ -799,7 +798,7 @@ Perl_leave_scope(pTHX_ I32 base)
            break;
        case SAVEt_BOOL:                        /* bool reference */
            ptr = SSPOPPTR;
            break;
        case SAVEt_BOOL:                        /* bool reference */
            ptr = SSPOPPTR;
-           *(bool*)ptr = cBOOL(SSPOPBOOL);
+           *(bool*)ptr = cBOOL(uv >> 8);
            break;
        case SAVEt_I32:                         /* I32 reference */
            ptr = SSPOPPTR;
            break;
        case SAVEt_I32:                         /* I32 reference */
            ptr = SSPOPPTR;