From: Nicholas Clark Date: Sat, 20 Feb 2010 18:35:23 +0000 (+0000) Subject: For SAVEt_I8, save the value with the type. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c61c2d446974ecc679f2ed5671233e66fec0984;p=p5sagit%2Fp5-mst-13.2.git For SAVEt_I8, save the value with the type. --- diff --git a/scope.c b/scope.c index 8a769a3..9f9da42 100644 --- a/scope.c +++ b/scope.c @@ -405,7 +405,9 @@ Perl_save_I8(pTHX_ I8 *bytep) PERL_ARGS_ASSERT_SAVE_I8; - save_pushi32ptr(*bytep, bytep, SAVEt_I8); + SSCHECK(2); + SSPUSHPTR(bytep); + SSPUSHUV(SAVEt_I8 | ((UV)*bytep << 8)); } void @@ -1088,7 +1090,7 @@ Perl_leave_scope(pTHX_ I32 base) break; case SAVEt_I8: /* I8 reference */ ptr = SSPOPPTR; - *(I8*)ptr = (I8)SSPOPINT; + *(I8*)ptr = (I8)(uv >> 8); break; case SAVEt_DESTRUCTOR: ptr = SSPOPPTR; diff --git a/sv.c b/sv.c index 3abeb54..c0f7ee3 100644 --- a/sv.c +++ b/sv.c @@ -11560,7 +11560,6 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param) break; case SAVEt_I32: /* I32 reference */ case SAVEt_I16: /* I16 reference */ - case SAVEt_I8: /* I8 reference */ case SAVEt_COP_ARYBASE: /* call CopARYBASE_set */ ptr = POPPTR(ss,ix); TOPPTR(nss,ix) = any_dup(ptr, proto_perl); @@ -11585,6 +11584,7 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param) ptr = POPPTR(ss,ix); TOPPTR(nss,ix) = any_dup(ptr, proto_perl); /* Fall through */ + case SAVEt_I8: /* I8 reference */ case SAVEt_BOOL: ptr = POPPTR(ss,ix); TOPPTR(nss,ix) = any_dup(ptr, proto_perl);