diff options
-rw-r--r-- | doio.c | 10 | ||||
-rw-r--r-- | doop.c | 8 | ||||
-rw-r--r-- | dump.c | 38 | ||||
-rw-r--r-- | gv.c | 16 | ||||
-rw-r--r-- | mg.c | 6 | ||||
-rw-r--r-- | op.c | 4 | ||||
-rw-r--r-- | pad.c | 2 | ||||
-rw-r--r-- | perl.c | 22 | ||||
-rw-r--r-- | pp.c | 4 | ||||
-rw-r--r-- | pp_ctl.c | 6 | ||||
-rw-r--r-- | pp_hot.c | 4 | ||||
-rw-r--r-- | pp_pack.c | 2 | ||||
-rw-r--r-- | pp_sys.c | 14 | ||||
-rw-r--r-- | regcomp.c | 4 | ||||
-rw-r--r-- | sv.c | 10 | ||||
-rw-r--r-- | toke.c | 28 | ||||
-rw-r--r-- | universal.c | 2 | ||||
-rw-r--r-- | utf8.c | 4 | ||||
-rw-r--r-- | util.c | 6 |
19 files changed, 95 insertions, 95 deletions
@@ -210,7 +210,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw, goto say_false; } #endif /* USE_STDIO */ - name = SvOK(*svp) ? savesvpv (*svp) : savepvn ("", 0); + name = SvOK(*svp) ? savesvpv (*svp) : savepvs (""); SAVEFREEPV(name); } else { @@ -762,7 +762,7 @@ Perl_nextargv(pTHX_ register GV *gv) const char *star = strchr(PL_inplace, '*'); if (star) { const char *begin = PL_inplace; - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); do { sv_catpvn(sv, begin, star - begin); sv_catpvn(sv, PL_oldname, oldlen); @@ -1269,7 +1269,7 @@ Perl_my_stat(pTHX) do_fstat_have_io: PL_laststype = OP_STAT; PL_statgv = gv; - sv_setpvn(PL_statname, "", 0); + sv_setpvs(PL_statname, ""); if(io) { if (IoIFP(io)) { return (PL_laststatval = PerlLIO_fstat(PerlIO_fileno(IoIFP(io)), &PL_statcache)); @@ -2151,7 +2151,7 @@ Perl_do_msgrcv(pTHX_ SV **mark, SV **sp) /* suppress warning when reading into undef var --jhi */ if (! SvOK(mstr)) - sv_setpvn(mstr, "", 0); + sv_setpvs(mstr, ""); msize = SvIVx(*++mark); mtype = (long)SvIVx(*++mark); flags = SvIVx(*++mark); @@ -2256,7 +2256,7 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp) char *mbuf; /* suppress warning when reading into undef var (tchrist 3/Mar/00) */ if (! SvOK(mstr)) - sv_setpvn(mstr, "", 0); + sv_setpvs(mstr, ""); SvPV_force_nolen(mstr); mbuf = SvGROW(mstr, (STRLEN)msize+1); @@ -693,7 +693,7 @@ Perl_do_join(pTHX_ register SV *sv, SV *delim, register SV **mark, register SV * ++mark; } - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); /* sv_setpv retains old UTF8ness [perl #24846] */ SvUTF8_off(sv); @@ -1028,7 +1028,7 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv) } } else - sv_setpvn(astr, "", 0); + sv_setpvs(astr, ""); } else if (s && len) { s += --len; @@ -1039,7 +1039,7 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv) SvNIOK_off(sv); } else - sv_setpvn(astr, "", 0); + sv_setpvs(astr, ""); SvSETMAGIC(sv); } @@ -1203,7 +1203,7 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) if (sv != left || (optype != OP_BIT_AND && !SvOK(sv) && !SvGMAGICAL(sv))) - sv_setpvn(sv, "", 0); /* avoid undef warning on |= and ^= */ + sv_setpvs(sv, ""); /* avoid undef warning on |= and ^= */ lsave = lc = SvPV_nomg_const(left, leftlen); rsave = rc = SvPV_nomg_const(right, rightlen); @@ -219,7 +219,7 @@ Perl_pv_escape( pTHX_ SV *dsv, char const * const str, if (!(flags & PERL_PV_ESCAPE_NOCLEAR)) { /* This won't alter the UTF-8 flag */ - sv_setpvn(dsv, "", 0); + sv_setpvs(dsv, ""); } if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count)) @@ -330,29 +330,29 @@ Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count, if (!(flags & PERL_PV_PRETTY_NOCLEAR)) { /* This won't alter the UTF-8 flag */ - sv_setpvn(dsv, "", 0); + sv_setpvs(dsv, ""); } if ( dq == '"' ) - sv_catpvn(dsv, "\"", 1); + sv_catpvs(dsv, "\""); else if ( flags & PERL_PV_PRETTY_LTGT ) - sv_catpvn(dsv, "<", 1); + sv_catpvs(dsv, "<"); if ( start_color != NULL ) - Perl_sv_catpv( aTHX_ dsv, start_color); + sv_catpv(dsv, start_color); pv_escape( dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR ); if ( end_color != NULL ) - Perl_sv_catpv( aTHX_ dsv, end_color); + sv_catpv(dsv, end_color); if ( dq == '"' ) - sv_catpvn( dsv, "\"", 1 ); + sv_catpvs( dsv, "\""); else if ( flags & PERL_PV_PRETTY_LTGT ) - sv_catpvn( dsv, ">", 1); + sv_catpvs(dsv, ">"); if ( (flags & PERL_PV_PRETTY_ELLIPSES) && ( escaped < count ) ) - sv_catpvn( dsv, "...", 3 ); + sv_catpvs(dsv, "..."); return SvPVX(dsv); } @@ -377,7 +377,7 @@ Perl_pv_display(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pv { pv_pretty( dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP); if (len > cur && pv[cur] == '\0') - sv_catpvn( dsv, "\\0", 2 ); + sv_catpvs( dsv, "\\0"); return SvPVX(dsv); } @@ -389,7 +389,7 @@ Perl_sv_peek(pTHX_ SV *sv) int unref = 0; U32 type; - sv_setpvn(t, "", 0); + sv_setpvs(t, ""); retry: if (!sv) { sv_catpv(t, "VOID"); @@ -968,13 +968,13 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o) #ifdef PERL_MAD if (PL_madskills && o->op_madprop) { - SV * const tmpsv = newSVpvn("", 0); + SV * const tmpsv = newSVpvs(""); MADPROP* mp = o->op_madprop; Perl_dump_indent(aTHX_ level, file, "MADPROPS = {\n"); level++; while (mp) { const char tmp = mp->mad_key; - sv_setpvn(tmpsv,"'",1); + sv_setpvs(tmpsv,"'"); if (tmp) sv_catpvn(tmpsv, &tmp, 1); sv_catpv(tmpsv, "'="); @@ -1607,7 +1607,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo Perl_dump_indent(aTHX_ level, file, " FILL = %"IVdf"\n", (IV)AvFILLp(sv)); Perl_dump_indent(aTHX_ level, file, " MAX = %"IVdf"\n", (IV)AvMAX(sv)); Perl_dump_indent(aTHX_ level, file, " ARYLEN = 0x%"UVxf"\n", SvMAGIC(sv) ? PTR2UV(AvARYLEN(sv)) : 0); - sv_setpvn(d, "", 0); + sv_setpvs(d, ""); if (AvREAL(sv)) sv_catpv(d, ",REAL"); if (AvREIFY(sv)) sv_catpv(d, ",REIFY"); Perl_dump_indent(aTHX_ level, file, " FLAGS = (%s)\n", @@ -2162,7 +2162,7 @@ Perl_sv_catxmlpvn(pTHX_ SV *dsv, const char *pv, STRLEN len, int utf8) STRLEN dsvcur; STRLEN cl; - sv_catpvn(dsv,"",0); + sv_catpvs(dsv,""); dsvcur = SvCUR(dsv); /* in case we have to restart */ retry: @@ -2286,7 +2286,7 @@ Perl_sv_xmlpeek(pTHX_ SV *sv) int unref = 0; sv_utf8_upgrade(t); - sv_setpvn(t, "", 0); + sv_setpvs(t, ""); /* retry: */ if (!sv) { sv_catpv(t, "VOID=\"\""); @@ -2532,7 +2532,7 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o) PerlIO_printf(file, " addr=\"0x%"UVxf" => 0x%"UVxf"\"", (UV)o, (UV)o->op_next); #endif if (o->op_flags) { - SV * const tmpsv = newSVpvn("", 0); + SV * const tmpsv = newSVpvs(""); switch (o->op_flags & OPf_WANT) { case OPf_WANT_VOID: sv_catpv(tmpsv, ",VOID"); @@ -2563,7 +2563,7 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o) SvREFCNT_dec(tmpsv); } if (o->op_private) { - SV * const tmpsv = newSVpvn("", 0); + SV * const tmpsv = newSVpvs(""); if (PL_opargs[o->op_type] & OA_TARGLEX) { if (o->op_private & OPpTARGET_MY) sv_catpv(tmpsv, ",TARGET_MY"); @@ -2840,7 +2840,7 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o) level++; while (mp) { char tmp = mp->mad_key; - sv_setpvn(tmpsv,"\"",1); + sv_setpvs(tmpsv,"\""); if (tmp) sv_catxmlpvn(tmpsv, &tmp, 1, 0); if ((tmp == '_') || (tmp == '#')) /* '_' '#' whitespace belong to the previous token. */ @@ -1048,7 +1048,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, if (USE_UTF8_IN_NAMES) SvUTF8_on(err); qerror(err); - gv = gv_fetchpvn_flags("<none>::", 8, GV_ADDMULTI, SVt_PVHV); + gv = gv_fetchpvs("<none>::", GV_ADDMULTI, SVt_PVHV); if(!gv) { /* symbol table under destruction */ return NULL; @@ -1138,15 +1138,15 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, && AvFILLp(av) == -1) { const char *pname; - av_push(av, newSVpvn(pname = "NDBM_File",9)); + av_push(av, newSVpvs(pname = "NDBM_File")); gv_stashpvn(pname, 9, GV_ADD); - av_push(av, newSVpvn(pname = "DB_File",7)); + av_push(av, newSVpvs(pname = "DB_File")); gv_stashpvn(pname, 7, GV_ADD); - av_push(av, newSVpvn(pname = "GDBM_File",9)); + av_push(av, newSVpvs(pname = "GDBM_File")); gv_stashpvn(pname, 9, GV_ADD); - av_push(av, newSVpvn(pname = "SDBM_File",9)); + av_push(av, newSVpvs(pname = "SDBM_File")); gv_stashpvn(pname, 9, GV_ADD); - av_push(av, newSVpvn(pname = "ODBM_File",9)); + av_push(av, newSVpvs(pname = "ODBM_File")); gv_stashpvn(pname, 9, GV_ADD); } } @@ -1353,11 +1353,11 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, break; case '\014': /* $^L */ - sv_setpvn(GvSVn(gv),"\f",1); + sv_setpvs(GvSVn(gv),"\f"); PL_formfeed = GvSVn(gv); break; case ';': - sv_setpvn(GvSVn(gv),"\034",1); + sv_setpvs(GvSVn(gv),"\034"); break; case ']': { @@ -745,7 +745,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) if (sys$getmsg(vaxc$errno,&msgdsc.dsc$w_length,&msgdsc,0,0) & 1) sv_setpvn(sv,msgdsc.dsc$a_pointer,msgdsc.dsc$w_length); else - sv_setpvn(sv,"",0); + sv_setpvs(sv,""); } #elif defined(OS2) if (!(_emx_env & 0x200)) { /* Under DOS */ @@ -768,7 +768,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) PerlProc_GetOSError(sv, dwErr); } else - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); SetLastError(dwErr); } #else @@ -2366,7 +2366,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) ensure that hints for input are sooner on linked list. */ tmp = out ? newSVpvn_flags(out + 1, start + len - out - 1, SVs_TEMP | SvUTF8(sv)) - : newSVpvn_flags("", 0, SVs_TEMP | SvUTF8(sv)); + : newSVpvs_flags("", SVs_TEMP | SvUTF8(sv)); tmp_he = Perl_refcounted_he_new(aTHX_ PL_compiling.cop_hints_hash, @@ -5498,7 +5498,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) SvREFCNT_inc_simple_void_NN(const_sv); if (cv) { assert(!CvROOT(cv) && !CvCONST(cv)); - sv_setpvn((SV*)cv, "", 0); /* prototype is "" */ + sv_setpvs((SV*)cv, ""); /* prototype is "" */ CvXSUBANY(cv).any_ptr = const_sv; CvXSUB(cv) = const_sv_xsub; CvCONST_on(cv); @@ -6806,7 +6806,7 @@ Perl_ck_fun(pTHX_ OP *o) namesv = PAD_SVl(targ); SvUPGRADE(namesv, SVt_PV); if (*name != '$') - sv_setpvn(namesv, "$", 1); + sv_setpvs(namesv, "$"); sv_catpvn(namesv, name, len); } } @@ -489,7 +489,7 @@ Perl_pad_add_anon(pTHX_ SV* sv, OPCODE op_type) PADOFFSET ix; SV* const name = newSV_type(SVt_PVNV); pad_peg("add_anon"); - sv_setpvn(name, "&", 1); + sv_setpvs(name, "&"); /* Are these two actually ever read? */ COP_SEQ_RANGE_HIGH_set(name, ~0); COP_SEQ_RANGE_LOW_set(name, 1); @@ -355,9 +355,9 @@ perl_construct(pTHXx) PL_fdpid = newAV(); /* for remembering popen pids by fd */ PL_modglobal = newHV(); /* pointers to per-interpreter module globals */ PL_errors = newSVpvs(""); - sv_setpvn(PERL_DEBUG_PAD(0), "", 0); /* For regex debugging. */ - sv_setpvn(PERL_DEBUG_PAD(1), "", 0); /* ext/re needs these */ - sv_setpvn(PERL_DEBUG_PAD(2), "", 0); /* even without DEBUGGING. */ + sv_setpvs(PERL_DEBUG_PAD(0), ""); /* For regex debugging. */ + sv_setpvs(PERL_DEBUG_PAD(1), ""); /* ext/re needs these */ + sv_setpvs(PERL_DEBUG_PAD(2), ""); /* even without DEBUGGING. */ #ifdef USE_ITHREADS /* First entry is an array of empty elements */ Perl_av_create_and_push(aTHX_ &PL_regex_padav,(SV*)newAV()); @@ -1706,7 +1706,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) bool add_read_e_script = FALSE; SvGROW(linestr_sv, 80); - sv_setpvn(linestr_sv,"",0); + sv_setpvs(linestr_sv,""); sv = newSVpvs(""); /* first used for -I flags */ SAVEFREESV(sv); @@ -2171,12 +2171,12 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) U32 out = PL_unicode & PERL_UNICODE_OUT_FLAG; if (in) { if (out) - sv_setpvn(sv, ":utf8\0:utf8", 11); + sv_setpvs(sv, ":utf8\0:utf8"); else - sv_setpvn(sv, ":utf8\0", 6); + sv_setpvs(sv, ":utf8\0"); } else if (out) - sv_setpvn(sv, "\0:utf8", 6); + sv_setpvs(sv, "\0:utf8"); SvSETMAGIC(sv); } } @@ -3537,7 +3537,7 @@ S_init_main_stash(pTHX) PL_globalstash = GvHV(gv_fetchpvs("CORE::GLOBAL::", GV_ADDMULTI, SVt_PVHV)); /* We must init $/ before switches are processed. */ - sv_setpvn(get_sv("/", TRUE), "\n", 1); + sv_setpvs(get_sv("/", TRUE), "\n"); } STATIC int @@ -4576,7 +4576,7 @@ S_init_predump_symbols(pTHX) GV *tmpgv; IO *io; - sv_setpvn(get_sv("\"", TRUE), " ", 1); + sv_setpvs(get_sv("\"", TRUE), " "); PL_stdingv = gv_fetchpvs("STDIN", GV_ADD|GV_NOTQUAL, SVt_PVIO); GvMULTI_on(PL_stdingv); io = GvIOp(PL_stdingv); @@ -4658,9 +4658,9 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register GV* tmpgv; PL_toptarget = newSV_type(SVt_PVFM); - sv_setpvn(PL_toptarget, "", 0); + sv_setpvs(PL_toptarget, ""); PL_bodytarget = newSV_type(SVt_PVFM); - sv_setpvn(PL_bodytarget, "", 0); + sv_setpvs(PL_bodytarget, ""); PL_formtarget = PL_bodytarget; TAINT; @@ -2432,7 +2432,7 @@ PP(pp_negate) STRLEN len; const char * const s = SvPV_const(sv, len); if (isIDFIRST(*s)) { - sv_setpvn(TARG, "-", 1); + sv_setpvs(TARG, "-"); sv_catsv(TARG, sv); } else if (*s == '+' || *s == '-') { @@ -2446,7 +2446,7 @@ PP(pp_negate) if (SvNOK(sv)) sv_setnv(TARG, -SvNV(sv)); else { - sv_setpvn(TARG, "-", 1); + sv_setpvs(TARG, "-"); sv_catsv(TARG, sv); } } @@ -96,7 +96,7 @@ PP(pp_regcomp) /* multiple args; concatentate them */ dMARK; dORIGMARK; tmpstr = PAD_SV(ARGTARG); - sv_setpvn(tmpstr, "", 0); + sv_setpvs(tmpstr, ""); while (++MARK <= SP) { if (PL_amagic_generation) { SV *sv; @@ -1145,7 +1145,7 @@ PP(pp_flip) RETURNOP(((LOGOP*)cUNOP->op_first)->op_other); } } - sv_setpvn(TARG, "", 0); + sv_setpvs(TARG, ""); SETs(targ); RETURN; } @@ -1503,7 +1503,7 @@ Perl_die_where(pTHX_ const char *message, STRLEN msglen) SV * const err = ERRSV; const char *e = NULL; if (!SvPOK(err)) - sv_setpvn(err,"",0); + sv_setpvs(err,""); else if (SvCUR(err) >= sizeof(prefix)+msglen-1) { STRLEN len; e = SvPV_const(err, len); @@ -269,7 +269,7 @@ PP(pp_concat) if (!SvOK(TARG)) { if (left == right && ckWARN(WARN_UNINITIALIZED)) report_uninit(right); - sv_setpvn(left, "", 0); + sv_setpvs(left, ""); } (void)SvPV_nomg_const(left, llen); /* Needed to set UTF8 flag */ lbyte = !DO_UTF8(left); @@ -1570,7 +1570,7 @@ Perl_do_readline(pTHX) if (av_len(GvAVn(PL_last_in_gv)) < 0) { IoFLAGS(io) &= ~IOf_START; do_open(PL_last_in_gv,"-",1,FALSE,O_RDONLY,0,NULL); - sv_setpvn(GvSVn(PL_last_in_gv), "-", 1); + sv_setpvs(GvSVn(PL_last_in_gv), "-"); SvSETMAGIC(GvSV(PL_last_in_gv)); fp = IoIFP(io); goto have_fp; @@ -3559,7 +3559,7 @@ PP(pp_pack) register const char *patend = pat + fromlen; MARK++; - sv_setpvn(cat, "", 0); + sv_setpvs(cat, ""); SvUTF8_off(cat); packlist(cat, pat, patend, MARK, SP + 1); @@ -328,7 +328,7 @@ PP(pp_backtick) ENTER; SAVESPTR(PL_rs); PL_rs = &PL_sv_undef; - sv_setpvn(TARG, "", 0); /* note that this preserves previous buffer */ + sv_setpvs(TARG, ""); /* note that this preserves previous buffer */ while (sv_gets(TARG, fp, SvCUR(TARG)) != NULL) NOOP; LEAVE; @@ -1222,7 +1222,7 @@ PP(pp_getc) RETPUSHUNDEF; } TAINT; - sv_setpvn(TARG, " ", 1); + sv_setpvs(TARG, " "); *SvPVX(TARG) = PerlIO_getc(IoIFP(GvIOp(gv))); /* should never be EOF */ if (PerlIO_isutf8(IoIFP(GvIOp(gv)))) { /* Find out how many bytes the char needs */ @@ -1574,7 +1574,7 @@ PP(pp_sysread) goto say_undef; bufsv = *++MARK; if (! SvOK(bufsv)) - sv_setpvn(bufsv, "", 0); + sv_setpvs(bufsv, ""); length = SvIVx(*++MARK); SETERRNO(0,0); if (MARK < SP) @@ -2018,10 +2018,10 @@ PP(pp_eof) IoFLAGS(io) &= ~IOf_START; do_open(gv, "-", 1, FALSE, O_RDONLY, 0, NULL); if ( GvSV(gv) ) { - sv_setpvn(GvSV(gv), "-", 1); + sv_setpvs(GvSV(gv), "-"); } else { - GvSV(gv) = newSVpvn("-", 1); + GvSV(gv) = newSVpvs("-"); } SvSETMAGIC(GvSV(gv)); } @@ -2814,7 +2814,7 @@ PP(pp_stat) if (gv != PL_defgv) { PL_laststype = OP_STAT; PL_statgv = gv; - sv_setpvn(PL_statname, "", 0); + sv_setpvs(PL_statname, ""); if(gv) { io = GvIO(gv); do_fstat_have_io: @@ -3267,7 +3267,7 @@ PP(pp_fttext) else { PL_statgv = gv; PL_laststatval = -1; - sv_setpvn(PL_statname, "", 0); + sv_setpvs(PL_statname, ""); io = GvIO(PL_statgv); } if (io && IoIFP(io)) { @@ -8847,7 +8847,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o) GET_RE_DEBUG_FLAGS_DECL; - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); if (OP(o) > REGNODE_MAX) /* regnode.type is unsigned */ /* It would be nice to FAIL() here, but this may be called from @@ -9846,7 +9846,7 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node, #endif const regnode *nextbranch= NULL; I32 word_idx; - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); for (word_idx= 0; word_idx < (I32)trie->wordcount; word_idx++) { SV ** const elem_ptr = av_fetch(trie_words,word_idx,0); @@ -8572,7 +8572,7 @@ Usually used via one of its frontends C<sv_vsetpvf> and C<sv_vsetpvf_mg>. void Perl_sv_vsetpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV **svargs, I32 svmax, bool *maybe_tainted) { - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""; sv_vcatpvfn(sv, pat, patlen, args, svargs, svmax, maybe_tainted); } @@ -11314,9 +11314,9 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, #endif PL_encoding = sv_dup(proto_perl->Iencoding, param); - sv_setpvn(PERL_DEBUG_PAD(0), "", 0); /* For regex debugging. */ - sv_setpvn(PERL_DEBUG_PAD(1), "", 0); /* ext/re needs these */ - sv_setpvn(PERL_DEBUG_PAD(2), "", 0); /* even without DEBUGGING. */ + sv_setpvs(PERL_DEBUG_PAD(0), ""); /* For regex debugging. */ + sv_setpvs(PERL_DEBUG_PAD(1), ""); /* ext/re needs these */ + sv_setpvs(PERL_DEBUG_PAD(2), ""); /* even without DEBUGGING. */ /* RE engine related */ @@ -12274,7 +12274,7 @@ S_find_uninit_var(pTHX_ OP* obase, SV* uninit_sv, bool match) : DEFSV)) { sv = sv_newmortal(); - sv_setpvn(sv, "$_", 2); + sv_setpvs(sv, "$_"); return sv; } } @@ -1087,17 +1087,17 @@ S_skipspace(pTHX_ register char *s) } else if (PL_minus_n) { #ifdef PERL_MAD - sv_catpvn(PL_linestr, ";}", 2); + sv_catpvs(PL_linestr, ";}"); #else - sv_setpvn(PL_linestr, ";}", 2); + sv_setpvs(PL_linestr, ";}"); #endif PL_minus_n = 0; } else #ifdef PERL_MAD - sv_catpvn(PL_linestr,";", 1); + sv_catpvs(PL_linestr,";"); #else - sv_setpvn(PL_linestr,";", 1); + sv_setpvs(PL_linestr,";"); #endif /* reset variables for next time we lex */ @@ -1286,7 +1286,7 @@ S_curmad(pTHX_ char slot, SV *sv) where = &PL_nexttoke[PL_curforce].next_mad; if (PL_faketokens) - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); else { if (!IN_BYTES) { if (UTF && is_utf8_string((U8*)SvPVX(sv), SvCUR(sv))) @@ -1795,7 +1795,7 @@ S_sublex_done(pTHX) PL_thiswhite = 0; } if (PL_thistoken) - sv_setpvn(PL_thistoken,"",0); + sv_setpvs(PL_thistoken,""); else PL_realtokenstart = -1; } @@ -3695,7 +3695,7 @@ Perl_yylex(pTHX) } PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr); PL_last_lop = PL_last_uni = NULL; - sv_setpvn(PL_linestr,"",0); + sv_setpvs(PL_linestr,""); TOKEN(';'); /* not infinite loop because rsfp is NULL now */ } /* If it looks like the start of a BOM or raw UTF-16, @@ -3740,7 +3740,7 @@ Perl_yylex(pTHX) sv_catsv(PL_thiswhite, PL_linestr); #endif if (*s == '=' && strnEQ(s, "=cut", 4) && !isALPHA(s[4])) { - sv_setpvn(PL_linestr, "", 0); + sv_setpvs(PL_linestr, ""); PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr); PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr); PL_last_lop = PL_last_uni = NULL; @@ -3928,7 +3928,7 @@ Perl_yylex(pTHX) /* if we have already added "LINE: while (<>) {", we must not do it again */ { - sv_setpvn(PL_linestr, "", 0); + sv_setpvs(PL_linestr, ""); PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr); PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr); PL_last_lop = PL_last_uni = NULL; @@ -4027,7 +4027,7 @@ Perl_yylex(pTHX) if (!PL_thiswhite) PL_thiswhite = newSVpvs(""); if (CopLINE(PL_curcop) == 1) { - sv_setpvn(PL_thiswhite, "", 0); + sv_setpvs(PL_thiswhite, ""); PL_faketokens = 0; } sv_catpvn(PL_thiswhite, s, d - s); @@ -4591,7 +4591,7 @@ Perl_yylex(pTHX) if (PL_madskills) { if (!PL_thiswhite) PL_thiswhite = newSVpvs(""); - sv_catpvn(PL_thiswhite,"}",1); + sv_catpvs(PL_thiswhite,"}"); } #endif return yylex(); /* ignore fake brackets */ @@ -6653,7 +6653,7 @@ Perl_yylex(pTHX) Perl_croak(aTHX_ "Missing name in \"my sub\""); PL_expect = XTERMBLOCK; attrful = XATTRTERM; - sv_setpvn(PL_subname,"?",1); + sv_setpvs(PL_subname,"?"); have_name = FALSE; } @@ -11276,7 +11276,7 @@ S_scan_heredoc(pTHX_ register char *s) PL_last_lop = PL_last_uni = NULL; } else - sv_setpvn(tmpstr,"",0); /* avoid "uninitialized" warning */ + sv_setpvs(tmpstr,""); /* avoid "uninitialized" warning */ while (s >= PL_bufend) { /* multiple line string? */ #ifdef PERL_MAD if (PL_madskills) { @@ -12755,7 +12755,7 @@ Perl_scan_vstring(pTHX_ const char *s, const char *e, SV *sv) if (*s == 'v') s++; /* get past 'v' */ - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); for (;;) { /* this is atoi() that tolerates underscores */ diff --git a/universal.c b/universal.c index e316f597bb..6ad6b742e5 100644 --- a/universal.c +++ b/universal.c @@ -476,7 +476,7 @@ XS(XS_version_new) if ( items == 1 || vs == &PL_sv_undef ) { /* no param or explicit undef */ /* create empty object */ vs = sv_newmortal(); - sv_setpvn(vs,"",0); + sv_setpvs(vs,""); } else if ( items == 3 ) { vs = sv_newmortal(); @@ -2135,7 +2135,7 @@ Perl_pv_uni_display(pTHX_ SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV f int truncated = 0; const char *s, *e; - sv_setpvn(dsv, "", 0); + sv_setpvs(dsv, ""); SvUTF8_off(dsv); for (s = (const char *)spv, e = s + len; s < e; s += UTF8SKIP(s)) { UV u; @@ -2169,7 +2169,7 @@ Perl_pv_uni_display(pTHX_ SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV f } if (ok) { const char string = ok; - sv_catpvn(dsv, "\\", 1); + sv_catpvs(dsv, "\\"); sv_catpvn(dsv, &string, 1); } } @@ -3049,13 +3049,13 @@ Perl_same_dirent(pTHX_ const char *a, const char *b) if (strNE(a,b)) return FALSE; if (fa == a) - sv_setpvn(tmpsv, ".", 1); + sv_setpvs(tmpsv, "."); else sv_setpvn(tmpsv, a, fa - a); if (PerlLIO_stat(SvPVX_const(tmpsv), &tmpstatbuf1) < 0) return FALSE; if (fb == b) - sv_setpvn(tmpsv, ".", 1); + sv_setpvs(tmpsv, "."); else sv_setpvn(tmpsv, b, fb - b); if (PerlLIO_stat(SvPVX_const(tmpsv), &tmpstatbuf2) < 0) @@ -4355,7 +4355,7 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv) (void)hv_stores((HV *)hv, "original", orig); } else { - (void)hv_stores((HV *)hv, "original", newSVpvn("0",1)); + (void)hv_stores((HV *)hv, "original", newSVpvs("0")); av_push(av, newSViv(0)); } |