SvUTF8_off(TARG);
}
-#if defined(PERL_Y2KWARN)
- if ((SvIOK(right) || SvNOK(right)) && ckWARN(WARN_Y2K) && SvOK(TARG)) {
- if (llen >= 2 && lpv[llen - 2] == '1' && lpv[llen - 1] == '9'
- && (llen == 2 || !isDIGIT(lpv[llen - 3])))
- {
- Perl_warner(aTHX_ packWARN(WARN_Y2K), "Possible Y2K bug: %s",
- "about to append an integer to '19'");
- }
- }
-#endif
-
if (lbyte != rbyte) {
if (lbyte)
sv_utf8_upgrade_nomg(TARG);
if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs)
&& SvIVX(TOPs) != IV_MAX)
{
- ++SvIVX(TOPs);
+ SvIV_set(TOPs, SvIVX(TOPs) + 1);
SvFLAGS(TOPs) &= ~(SVp_NOK|SVp_POK);
}
else /* Do all the PERL_PRESERVE_IVUV conditionals in sv_inc */
i = 0;
while (relem <= lastrelem) { /* gobble up all the rest */
SV **didstore;
- sv = NEWSV(28,0);
assert(*relem);
- sv_setsv(sv,*relem);
+ sv = newSVsv(*relem);
*(relem++) = sv;
didstore = av_store(ary,i++,sv);
if (magic) {
continue;
}
} else if (SvUTF8(sv)) { /* OP_READLINE, OP_RCATLINE */
- U8 *s = (U8*)SvPVX(sv) + offset;
- STRLEN len = SvCUR(sv) - offset;
- U8 *f;
+ const U8 *s = (U8*)SvPVX(sv) + offset;
+ const STRLEN len = SvCUR(sv) - offset;
+ const U8 *f;
if (ckWARN(WARN_UTF8) &&
!Perl_is_utf8_string_loc(aTHX_ s, len, &f))
/* string increment */
register SV* cur = cx->blk_loop.iterlval;
STRLEN maxlen = 0;
- char *max = SvOK((SV*)av) ? SvPV((SV*)av, maxlen) : "";
+ const char *max = SvOK((SV*)av) ? SvPV((SV*)av, maxlen) : "";
if (!SvNIOK(cur) && SvCUR(cur) <= maxlen) {
if (SvREFCNT(*itersvp) == 1 && !SvMAGICAL(*itersvp)) {
/* safe to reuse old SV */
have_a_cow:
#endif
rxtainted |= RX_MATCH_TAINTED(rx);
- dstr = NEWSV(25, len);
- sv_setpvn(dstr, m, s-m);
+ dstr = newSVpvn(m, s-m);
if (DO_UTF8(TARG))
SvUTF8_on(dstr);
PL_curpm = pm;
(void)SvUPGRADE(dbsv, SVt_PVIV);
(void)SvIOK_on(dbsv);
SAVEIV(SvIVX(dbsv));
- SvIVX(dbsv) = PTR2IV(cv); /* Do it the quickest way */
+ SvIV_set(dbsv, PTR2IV(cv)); /* Do it the quickest way */
}
if (CvXSUB(cv))
sv_setiv(PL_DBassertion, 1);
cv = get_db_sub(&sv, cv);
- if (!cv)
- DIE(aTHX_ "No DBsub routine");
+ if (!cv || (!CvXSUB(cv) && !CvSTART(cv)))
+ DIE(aTHX_ "No DB::sub routine defined");
}
if (!(CvXSUB(cv))) {
*/
if (CvDEPTH(cv) >= 2) {
PERL_STACK_OVERFLOW_CHECK();
- pad_push(padlist, CvDEPTH(cv), 1);
+ pad_push(padlist, CvDEPTH(cv));
}
PAD_SET_CUR(padlist, CvDEPTH(cv));
if (hasargs)
SV* elemsv = POPs;
IV elem = SvIV(elemsv);
AV* av = (AV*)POPs;
- U32 lval = PL_op->op_flags & OPf_MOD || LVRET;
- U32 defer = (PL_op->op_private & OPpLVAL_DEFER) && (elem > AvFILL(av));
+ const U32 lval = PL_op->op_flags & OPf_MOD || LVRET;
+ const U32 defer = (PL_op->op_private & OPpLVAL_DEFER) && (elem > av_len(av));
SV *sv;
if (SvROK(elemsv) && !SvGAMAGIC(elemsv) && ckWARN(WARN_MISC))
* indent-tabs-mode: t
* End:
*
- * vim: expandtab shiftwidth=4:
+ * vim: shiftwidth=4:
*/