From: Jarkko Hietaniemi Date: Wed, 20 Aug 2003 10:49:51 +0000 (+0000) Subject: Patch from Enache for the crashing of bytecode.t in Tru64. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ecd04c98ca7b8e8e6f5b89e4a5d867cc1554f7a7;p=p5sagit%2Fp5-mst-13.2.git Patch from Enache for the crashing of bytecode.t in Tru64. p4raw-id: //depot/perl@20789 --- diff --git a/ext/B/B/Bytecode.pm b/ext/B/B/Bytecode.pm index 826ae5b..8580885 100644 --- a/ext/B/B/Bytecode.pm +++ b/ext/B/B/Bytecode.pm @@ -358,7 +358,7 @@ sub B::AV::bsave { nice "-AV-", asm "ldsv", $varix = $ix unless $ix == $varix; - asm "av_extend", $av->MAX; + asm "av_extend", $av->MAX if $av->MAX >= 0; asm "av_pushx", $_ for @array; asm "sv_refcnt", $av->REFCNT; asm "xav_flags", $av->AvFLAGS; diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h index a9de88f..8ca9382 100644 --- a/ext/ByteLoader/bytecode.h +++ b/ext/ByteLoader/bytecode.h @@ -171,10 +171,17 @@ typedef char *pvindex; #define BSET_newsv(sv, arg) \ - STMT_START { \ - sv = NEWSV(0,0); \ - SvUPGRADE(sv, (arg)); \ - } STMT_END + switch(arg) { \ + case SVt_PVAV: \ + sv = (SV*)newAV(); \ + break; \ + case SVt_PVHV: \ + sv = (SV*)newHV(); \ + break; \ + default: \ + sv = NEWSV(0,0); \ + SvUPGRADE(sv, (arg)); \ + } #define BSET_newsvx(sv, arg) STMT_START { \ BSET_newsv(sv, arg & SVTYPEMASK); \ SvFLAGS(sv) = arg; \