p4raw-id: //depot/perl@20789
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;
#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; \