LOCK_FDPID_MUTEX;
sv = *av_fetch(PL_fdpid,fd,TRUE);
- (void)SvUPGRADE(sv, SVt_IV);
+ SvUPGRADE(sv, SVt_IV);
pid = SvIVX(sv);
SvIV_set(sv, 0);
sv = *av_fetch(PL_fdpid,savefd,TRUE);
- (void)SvUPGRADE(sv, SVt_IV);
+ SvUPGRADE(sv, SVt_IV);
SvIV_set(sv, pid);
UNLOCK_FDPID_MUTEX;
}
mark++;
len = (items > 0 ? (delimlen * (items - 1) ) : 0);
- (void)SvUPGRADE(sv, SVt_PV);
+ SvUPGRADE(sv, SVt_PV);
if (SvLEN(sv) < len + items) { /* current length is way too short */
while (items-- > 0) {
if (*mark && !SvGAMAGIC(*mark) && SvOK(*mark)) {
case '?':
#ifdef COMPLEX_STATUS
- (void)SvUPGRADE(GvSV(gv), SVt_PVLV);
+ SvUPGRADE(GvSV(gv), SVt_PVLV);
#endif
goto magicalize;
/* Fake up a method call to import */
meth = newSVpvn("import", 6);
- (void)SvUPGRADE(meth, SVt_PVIV);
+ SvUPGRADE(meth, SVt_PVIV);
(void)SvIOK_on(meth);
{
U32 hash;
/* Fake up a method call to import/unimport */
meth = aver ? newSVpvn("import",6) : newSVpvn("unimport", 8);
- (void)SvUPGRADE(meth, SVt_PVIV);
+ SvUPGRADE(meth, SVt_PVIV);
(void)SvIOK_on(meth);
{
U32 hash;
SV *namesv;
targ = pad_alloc(OP_RV2GV, SVs_PADTMP);
namesv = PAD_SVl(targ);
- (void)SvUPGRADE(namesv, SVt_PV);
+ SvUPGRADE(namesv, SVt_PV);
if (*name != '$')
sv_setpvn(namesv, "$", 1);
sv_catpvn(namesv, name, len);
char *tmps;
UV value = POPu;
- (void)SvUPGRADE(TARG,SVt_PV);
+ SvUPGRADE(TARG,SVt_PV);
if (value > 255 && !IN_BYTES) {
SvGROW(TARG, (STRLEN)UNISKIP(value)+1);
else {
STRLEN min = len + 1;
- (void)SvUPGRADE(TARG, SVt_PV);
+ SvUPGRADE(TARG, SVt_PV);
SvGROW(TARG, min);
(void)SvPOK_only(TARG);
d = (U8*)SvPVX(TARG);
else {
STRLEN min = len + 1;
- (void)SvUPGRADE(TARG, SVt_PV);
+ SvUPGRADE(TARG, SVt_PV);
SvGROW(TARG, min);
(void)SvPOK_only(TARG);
d = (U8*)SvPVX(TARG);
SvUTF8_off(TARG); /* decontaminate */
if (len) {
- (void)SvUPGRADE(TARG, SVt_PV);
+ SvUPGRADE(TARG, SVt_PV);
SvGROW(TARG, (len * 2) + 1);
d = SvPVX(TARG);
if (DO_UTF8(sv)) {
MAGIC *mg;
I32 i;
if (SvTYPE(sv) < SVt_PVMG)
- (void)SvUPGRADE(sv, SVt_PVMG);
+ SvUPGRADE(sv, SVt_PVMG);
if (!(mg = mg_find(sv, PERL_MAGIC_regex_global))) {
sv_magic(sv, Nullsv, PERL_MAGIC_regex_global, Nullch, 0);
mg = mg_find(sv, PERL_MAGIC_regex_global);
sv = TARG;
if (SvROK(sv))
sv_unref(sv);
- (void)SvUPGRADE(sv, SVt_PV);
+ SvUPGRADE(sv, SVt_PV);
tmplen = SvLEN(sv); /* remember if already alloced */
if (!tmplen && !SvREADONLY(sv))
Sv_Grow(sv, 80); /* try short-buffering it */
tmps = SvPV(tmpsv, len);
if ((!tmps || !len) && PL_errgv) {
SV *error = ERRSV;
- (void)SvUPGRADE(error, SVt_PV);
+ SvUPGRADE(error, SVt_PV);
if (SvPOK(error) && SvCUR(error))
sv_catpv(error, "\t...caught");
tmpsv = error;
}
if (!tmps || !len) {
SV *error = ERRSV;
- (void)SvUPGRADE(error, SVt_PV);
+ SvUPGRADE(error, SVt_PV);
if (multiarg ? SvROK(error) : SvROK(tmpsv)) {
if (!multiarg)
SvSetSV(error,tmpsv);
SvCUR_set(bufsv, offset);
read_target = sv_newmortal();
- (void)SvUPGRADE(read_target, SVt_PV);
+ SvUPGRADE(read_target, SVt_PV);
buffer = SvGROW(read_target, (STRLEN)(length + 1));
}
if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv) &&
SvTYPE(sv) != SVt_PVGV)
{
- (void)SvUPGRADE(value, SvTYPE(sv));
+ SvUPGRADE(value, SvTYPE(sv));
SvMAGIC_set(value, SvMAGIC(sv));
SvFLAGS(value) |= SvMAGICAL(sv);
SvMAGICAL_off(sv);
len = 1;
}
#endif
- (void)SvUPGRADE(sv, SVt_PV);
+ SvUPGRADE(sv, SVt_PV);
*lp = len;
s = SvGROW(sv, len + 1);
SvCUR_set(sv, len);
}
}
if (stype == SVt_PVLV)
- (void)SvUPGRADE(dstr, SVt_PVNV);
+ SvUPGRADE(dstr, SVt_PVNV);
else
- (void)SvUPGRADE(dstr, (U32)stype);
+ SvUPGRADE(dstr, (U32)stype);
}
sflags = SvFLAGS(sstr);
}
else
new_SV(dstr);
- (void)SvUPGRADE (dstr, SVt_PVIV);
+ SvUPGRADE(dstr, SVt_PVIV);
assert (SvPOK(sstr));
assert (SvPOKp(sstr));
SV_COW_NEXT_SV_SET(dstr, SV_COW_NEXT_SV(sstr));
} else {
assert ((SvFLAGS(sstr) & CAN_COW_MASK) == CAN_COW_FLAGS);
- (void)SvUPGRADE (sstr, SVt_PVIV);
+ SvUPGRADE(sstr, SVt_PVIV);
SvREADONLY_on(sstr);
SvFAKE_on(sstr);
DEBUG_C(PerlIO_printf(Perl_debug_log,
if (iv < 0)
Perl_croak(aTHX_ "panic: sv_setpvn called with negative strlen");
}
- (void)SvUPGRADE(sv, SVt_PV);
+ SvUPGRADE(sv, SVt_PV);
SvGROW(sv, len + 1);
dptr = SvPVX(sv);
return;
}
len = strlen(ptr);
- (void)SvUPGRADE(sv, SVt_PV);
+ SvUPGRADE(sv, SVt_PV);
SvGROW(sv, len + 1);
Move(ptr,SvPVX(sv),len+1,char);
{
STRLEN allocate;
SV_CHECK_THINKFIRST_COW_DROP(sv);
- (void)SvUPGRADE(sv, SVt_PV);
+ SvUPGRADE(sv, SVt_PV);
if (!ptr) {
(void)SvOK_off(sv);
return;
MAGIC* mg;
if (SvTYPE(sv) < SVt_PVMG) {
- (void)SvUPGRADE(sv, SVt_PVMG);
+ SvUPGRADE(sv, SVt_PVMG);
}
Newz(702,mg, 1, MAGIC);
mg->mg_moremagic = SvMAGIC(sv);
However, perlbench says it's slower, because the existing swipe code
is faster than copy on write.
Swings and roundabouts. */
- (void)SvUPGRADE(sv, SVt_PV);
+ SvUPGRADE(sv, SVt_PV);
SvSCREAM_off(sv);
if (SvROK(sv))
sv_unref(sv);
- (void)SvUPGRADE(sv, SVt_PV); /* Never FALSE */
+ SvUPGRADE(sv, SVt_PV); /* Never FALSE */
SvGROW(sv, len + 1);
Move(s,SvPVX_const(sv),len,char);
SvCUR_set(sv, len);
SvOBJECT_on(tmpRef);
if (SvTYPE(tmpRef) != SVt_PVIO)
++PL_sv_objcount;
- (void)SvUPGRADE(tmpRef, SVt_PVMG);
+ SvUPGRADE(tmpRef, SVt_PVMG);
SvSTASH_set(tmpRef, (HV*)SvREFCNT_inc(stash));
if (Gv_AMG(stash))
#define SVTYPEMASK 0xff
#define SvTYPE(sv) ((sv)->sv_flags & SVTYPEMASK)
-#define SvUPGRADE(sv, mt) (SvTYPE(sv) >= mt || sv_upgrade(sv, mt))
+#define SvUPGRADE(sv, mt) (void)(SvTYPE(sv) >= mt || sv_upgrade(sv, mt))
#define SVs_PADSTALE 0x00000100 /* lexical has gone out of scope */
#define SVs_PADTMP 0x00000200 /* in use as tmp */
version = yylval.opval;
ver = cSVOPx(version)->op_sv;
if (SvPOK(ver) && !SvNIOK(ver)) {
- (void)SvUPGRADE(ver, SVt_PVNV);
+ SvUPGRADE(ver, SVt_PVNV);
SvNV_set(ver, str_to_version(ver));
SvNOK_on(ver); /* hint that it is a version */
}
PL_rsfp_filters = newAV();
if (!datasv)
datasv = NEWSV(255,0);
- (void)SvUPGRADE(datasv, SVt_PVIO);
+ SvUPGRADE(datasv, SVt_PVIO);
u.filter = funcp;
IoANY(datasv) = u.iop; /* stash funcp into spare field */
IoFLAGS(datasv) |= IOf_FAKE_DIRP;
mg->mg_len++;
}
s = (U8*)SvPV_force(sv, len);
- (void)SvUPGRADE(sv, SVt_PVBM);
+ SvUPGRADE(sv, SVt_PVBM);
if (len == 0) /* TAIL might be on a zero-length string. */
return;
if (len > 2) {
LOCK_FDPID_MUTEX;
sv = *av_fetch(PL_fdpid,p[This],TRUE);
UNLOCK_FDPID_MUTEX;
- (void)SvUPGRADE(sv,SVt_IV);
+ SvUPGRADE(sv,SVt_IV);
SvIV_set(sv, pid);
PL_forkprocess = pid;
/* If we managed to get status pipe check for exec fail */
LOCK_FDPID_MUTEX;
sv = *av_fetch(PL_fdpid,p[This],TRUE);
UNLOCK_FDPID_MUTEX;
- (void)SvUPGRADE(sv,SVt_IV);
+ SvUPGRADE(sv,SVt_IV);
SvIV_set(sv, pid);
PL_forkprocess = pid;
if (did_pipes && pid > 0) {
sprintf(spid, "%"IVdf, (IV)pid);
sv = *hv_fetch(PL_pidstatus,spid,strlen(spid),TRUE);
- (void)SvUPGRADE(sv,SVt_IV);
+ SvUPGRADE(sv,SVt_IV);
SvIV_set(sv, status);
return;
}
int pathlen=0;
Direntry_t *dp;
- (void)SvUPGRADE(sv, SVt_PV);
+ SvUPGRADE(sv, SVt_PV);
if (PerlLIO_lstat(".", &statbuf) < 0) {
SV_CWD_RETURN_UNDEF;