Change 34653 by [EMAIL PROTECTED] on 2008/10/29 23:04:34 Use pvs macros instead of pvn where possible.
Affected files ... ... //depot/perl/doio.c#372 edit ... //depot/perl/doop.c#205 edit ... //depot/perl/dump.c#317 edit ... //depot/perl/gv.c#402 edit ... //depot/perl/mg.c#536 edit ... //depot/perl/op.c#1014 edit ... //depot/perl/pad.c#126 edit ... //depot/perl/perl.c#881 edit ... //depot/perl/pp.c#636 edit ... //depot/perl/pp_ctl.c#703 edit ... //depot/perl/pp_hot.c#583 edit ... //depot/perl/pp_pack.c#145 edit ... //depot/perl/pp_sys.c#565 edit ... //depot/perl/regcomp.c#665 edit ... //depot/perl/sv.c#1567 edit ... //depot/perl/toke.c#832 edit ... //depot/perl/universal.c#203 edit ... //depot/perl/utf8.c#315 edit ... //depot/perl/util.c#663 edit Differences ... ==== //depot/perl/doio.c#372 (text) ==== Index: perl/doio.c --- perl/doio.c#371~34585~ 2008-10-25 05:23:01.000000000 -0700 +++ perl/doio.c 2008-10-29 16:04:34.000000000 -0700 @@ -212,7 +212,7 @@ goto say_false; } #endif /* USE_STDIO */ - name = SvOK(*svp) ? savesvpv (*svp) : savepvn ("", 0); + name = SvOK(*svp) ? savesvpv (*svp) : savepvs (""); SAVEFREEPV(name); } else { @@ -766,7 +766,7 @@ 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); @@ -1282,7 +1282,7 @@ 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)); @@ -2179,7 +2179,7 @@ /* 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); @@ -2288,7 +2288,7 @@ 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); ==== //depot/perl/doop.c#205 (text) ==== Index: perl/doop.c --- perl/doop.c#204~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/doop.c 2008-10-29 16:04:34.000000000 -0700 @@ -707,7 +707,7 @@ ++mark; } - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); /* sv_setpv retains old UTF8ness [perl #24846] */ SvUTF8_off(sv); @@ -1050,7 +1050,7 @@ } } else - sv_setpvn(astr, "", 0); + sv_setpvs(astr, ""); } else if (s && len) { s += --len; @@ -1061,7 +1061,7 @@ SvNIOK_off(sv); } else - sv_setpvn(astr, "", 0); + sv_setpvs(astr, ""); SvSETMAGIC(sv); } @@ -1228,7 +1228,7 @@ PERL_ARGS_ASSERT_DO_VOP; 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); ==== //depot/perl/dump.c#317 (text) ==== Index: perl/dump.c --- perl/dump.c#316~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/dump.c 2008-10-29 16:04:34.000000000 -0700 @@ -229,7 +229,7 @@ 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)) @@ -342,29 +342,29 @@ 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); } @@ -391,7 +391,7 @@ 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); } @@ -403,7 +403,7 @@ int unref = 0; U32 type; - sv_setpvn(t, "", 0); + sv_setpvs(t, ""); retry: if (!sv) { sv_catpv(t, "VOID"); @@ -988,13 +988,13 @@ #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, "'="); @@ -1656,7 +1656,7 @@ 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", @@ -2240,7 +2240,7 @@ PERL_ARGS_ASSERT_SV_CATXMLPVN; - sv_catpvn(dsv,"",0); + sv_catpvs(dsv,""); dsvcur = SvCUR(dsv); /* in case we have to restart */ retry: @@ -2366,7 +2366,7 @@ PERL_ARGS_ASSERT_SV_XMLPEEK; sv_utf8_upgrade(t); - sv_setpvn(t, "", 0); + sv_setpvs(t, ""); /* retry: */ if (!sv) { sv_catpv(t, "VOID=\"\""); @@ -2616,7 +2616,7 @@ 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"); @@ -2647,7 +2647,7 @@ 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"); @@ -2924,7 +2924,7 @@ 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. */ ==== //depot/perl/gv.c#402 (text) ==== Index: perl/gv.c --- perl/gv.c#401~34647~ 2008-10-29 14:57:34.000000000 -0700 +++ perl/gv.c 2008-10-29 16:04:34.000000000 -0700 @@ -1120,7 +1120,7 @@ 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; @@ -1210,15 +1210,15 @@ && 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); } } @@ -1425,11 +1425,11 @@ 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 ']': { ==== //depot/perl/mg.c#536 (text) ==== Index: perl/mg.c --- perl/mg.c#535~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/mg.c 2008-10-29 16:04:34.000000000 -0700 @@ -781,7 +781,7 @@ 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 */ @@ -804,7 +804,7 @@ PerlProc_GetOSError(sv, dwErr); } else - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); SetLastError(dwErr); } #else @@ -2444,7 +2444,7 @@ 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, ==== //depot/perl/op.c#1014 (text) ==== Index: perl/op.c --- perl/op.c#1013~34647~ 2008-10-29 14:57:34.000000000 -0700 +++ perl/op.c 2008-10-29 16:04:34.000000000 -0700 @@ -5661,7 +5661,7 @@ 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); @@ -7014,7 +7014,7 @@ namesv = PAD_SVl(targ); SvUPGRADE(namesv, SVt_PV); if (*name != '$') - sv_setpvn(namesv, "$", 1); + sv_setpvs(namesv, "$"); sv_catpvn(namesv, name, len); } } ==== //depot/perl/pad.c#126 (text) ==== Index: perl/pad.c --- perl/pad.c#125~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/pad.c 2008-10-29 16:04:34.000000000 -0700 @@ -499,7 +499,7 @@ PERL_ARGS_ASSERT_PAD_ADD_ANON; 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); ==== //depot/perl/perl.c#881 (text) ==== Index: perl/perl.c --- perl/perl.c#880~34647~ 2008-10-29 14:57:34.000000000 -0700 +++ perl/perl.c 2008-10-29 16:04:34.000000000 -0700 @@ -367,9 +367,9 @@ 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 a list of empty elements. It needs to be initialised else all hell breaks loose in S_find_uninit_var(). */ @@ -1712,7 +1712,7 @@ 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); @@ -2170,12 +2170,12 @@ 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); } } @@ -3573,7 +3573,7 @@ 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 @@ -4546,7 +4546,7 @@ 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); @@ -4633,9 +4633,9 @@ PERL_ARGS_ASSERT_INIT_POSTDUMP_SYMBOLS; 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; ==== //depot/perl/pp.c#636 (text) ==== Index: perl/pp.c --- perl/pp.c#635~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/pp.c 2008-10-29 16:04:34.000000000 -0700 @@ -2431,7 +2431,7 @@ 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 == '-') { @@ -2445,7 +2445,7 @@ if (SvNOK(sv)) sv_setnv(TARG, -SvNV(sv)); else { - sv_setpvn(TARG, "-", 1); + sv_setpvs(TARG, "-"); sv_catsv(TARG, sv); } } ==== //depot/perl/pp_ctl.c#703 (text) ==== Index: perl/pp_ctl.c --- perl/pp_ctl.c#702~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/pp_ctl.c 2008-10-29 16:04:34.000000000 -0700 @@ -95,7 +95,7 @@ /* 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; @@ -1154,7 +1154,7 @@ RETURNOP(((LOGOP*)cUNOP->op_first)->op_other); } } - sv_setpvn(TARG, "", 0); + sv_setpvs(TARG, ""); SETs(targ); RETURN; } @@ -1537,7 +1537,7 @@ 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); ==== //depot/perl/pp_hot.c#583 (text) ==== Index: perl/pp_hot.c --- perl/pp_hot.c#582~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/pp_hot.c 2008-10-29 16:04:34.000000000 -0700 @@ -255,7 +255,7 @@ 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); @@ -1571,7 +1571,7 @@ 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; ==== //depot/perl/pp_pack.c#145 (text) ==== Index: perl/pp_pack.c --- perl/pp_pack.c#144~34585~ 2008-10-25 05:23:01.000000000 -0700 +++ perl/pp_pack.c 2008-10-29 16:04:34.000000000 -0700 @@ -3592,7 +3592,7 @@ register const char *patend = pat + fromlen; MARK++; - sv_setpvn(cat, "", 0); + sv_setpvs(cat, ""); SvUTF8_off(cat); packlist(cat, pat, patend, MARK, SP + 1); ==== //depot/perl/pp_sys.c#565 (text) ==== Index: perl/pp_sys.c --- perl/pp_sys.c#564~34647~ 2008-10-29 14:57:34.000000000 -0700 +++ perl/pp_sys.c 2008-10-29 16:04:34.000000000 -0700 @@ -328,7 +328,7 @@ 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; @@ -1226,7 +1226,7 @@ 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 */ @@ -1579,7 +1579,7 @@ goto say_undef; bufsv = *++MARK; if (! SvOK(bufsv)) - sv_setpvn(bufsv, "", 0); + sv_setpvs(bufsv, ""); length = SvIVx(*++MARK); SETERRNO(0,0); if (MARK < SP) @@ -2023,10 +2023,10 @@ 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)); } @@ -2819,7 +2819,7 @@ 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: @@ -3272,7 +3272,7 @@ else { PL_statgv = gv; PL_laststatval = -1; - sv_setpvn(PL_statname, "", 0); + sv_setpvs(PL_statname, ""); io = GvIO(PL_statgv); } if (io && IoIFP(io)) { ==== //depot/perl/regcomp.c#665 (text) ==== Index: perl/regcomp.c --- perl/regcomp.c#664~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/regcomp.c 2008-10-29 16:04:34.000000000 -0700 @@ -8973,7 +8973,7 @@ PERL_ARGS_ASSERT_REGPROP; - 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 @@ -9949,7 +9949,7 @@ #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); ==== //depot/perl/sv.c#1567 (text) ==== Index: perl/sv.c --- perl/sv.c#1566~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/sv.c 2008-10-29 16:04:34.000000000 -0700 @@ -8912,7 +8912,7 @@ { PERL_ARGS_ASSERT_SV_VSETPVFN; - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); sv_vcatpvfn(sv, pat, patlen, args, svargs, svmax, maybe_tainted); } @@ -11702,9 +11702,9 @@ #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 */ @@ -12660,7 +12660,7 @@ : DEFSV)) { sv = sv_newmortal(); - sv_setpvn(sv, "$_", 2); + sv_setpvs(sv, "$_"); return sv; } } ==== //depot/perl/toke.c#832 (text) ==== Index: perl/toke.c --- perl/toke.c#831~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/toke.c 2008-10-29 16:04:34.000000000 -0700 @@ -1119,17 +1119,17 @@ } 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 */ @@ -1319,7 +1319,7 @@ 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))) @@ -1846,7 +1846,7 @@ PL_thiswhite = 0; } if (PL_thistoken) - sv_setpvn(PL_thistoken,"",0); + sv_setpvs(PL_thistoken,""); else PL_realtokenstart = -1; } @@ -3768,7 +3768,7 @@ } 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, @@ -3804,7 +3804,7 @@ 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; @@ -3992,7 +3992,7 @@ /* 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; @@ -4091,7 +4091,7 @@ 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); @@ -4655,7 +4655,7 @@ if (PL_madskills) { if (!PL_thiswhite) PL_thiswhite = newSVpvs(""); - sv_catpvn(PL_thiswhite,"}",1); + sv_catpvs(PL_thiswhite,"}"); } #endif return yylex(); /* ignore fake brackets */ @@ -6727,7 +6727,7 @@ 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; } @@ -11410,7 +11410,7 @@ 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) { @@ -12907,7 +12907,7 @@ if (*s == 'v') s++; /* get past 'v' */ - sv_setpvn(sv, "", 0); + sv_setpvs(sv, ""); for (;;) { /* this is atoi() that tolerates underscores */ ==== //depot/perl/universal.c#203 (text) ==== Index: perl/universal.c --- perl/universal.c#202~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/universal.c 2008-10-29 16:04:34.000000000 -0700 @@ -504,7 +504,7 @@ 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(); ==== //depot/perl/utf8.c#315 (text) ==== Index: perl/utf8.c --- perl/utf8.c#314~34642~ 2008-10-29 13:39:43.000000000 -0700 +++ perl/utf8.c 2008-10-29 16:04:34.000000000 -0700 @@ -2254,7 +2254,7 @@ PERL_ARGS_ASSERT_PV_UNI_DISPLAY; - 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; @@ -2288,7 +2288,7 @@ } if (ok) { const char string = ok; - sv_catpvn(dsv, "\\", 1); + sv_catpvs(dsv, "\\"); sv_catpvn(dsv, &string, 1); } } ==== //depot/perl/util.c#663 (text) ==== Index: perl/util.c --- perl/util.c#662~34650~ 2008-10-29 15:45:15.000000000 -0700 +++ perl/util.c 2008-10-29 16:04:34.000000000 -0700 @@ -3108,13 +3108,13 @@ 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) @@ -4425,7 +4425,7 @@ (void)hv_stores(MUTABLE_HV(hv), "original", orig); } else { - (void)hv_stores(MUTABLE_HV(hv), "original", newSVpvn("0",1)); + (void)hv_stores(MUTABLE_HV(hv), "original", newSVpvs("0")); av_push(av, newSViv(0)); } End of Patch.