develooper Front page | perl.perl5.porters | Postings from December 2002

[PATCH] %_ (was Re: [PATCH] operation on `PL_na' may be undefined)

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
December 26, 2002 13:33
Subject:
[PATCH] %_ (was Re: [PATCH] operation on `PL_na' may be undefined)
Message ID:
20021226211626.GD284@Bagpuss.unfortu.net
On Mon, Dec 23, 2002 at 06:22:02AM +0000, hv@crypt.org wrote:
> John Peacock <jpeacock@rowman.com> wrote:
> :Nicholas Clark wrote:
> :> I wonder how many parts of the perl core can be reduced slightly in size
> :> by changing %s SvPV_nolen(sv) to %_ sv.
> :
> :I was wondering that myself.  I may give it a shot, but it might be a fairly 
> :megapatch.  We'll see if Hugo likes it...
> 
> Sounds like a fine idea to me: less code, no speed penalty that I can see.
> If the patch is very large, best not to spam p5p with it - you can send
> it to me direct, or put it up for ftp/http somewhere.

It's not huge. I left out patching the OS/2 specific code in Devel::DProf,
and I'll send the patch to ext/Encode/Unicode/Unicode.xs direct to Dan
Kogai

Doing all of this makes my perl binary 0.06% smaller. Wow! that's so much.
However, I suspect every little helps (and my message is double that, at 0.13%)
so I'll get to 0.25% with the 3 patches)

Nicholas Clark

--- ./doio.c.orig	Thu Nov  7 14:26:22 2002
+++ ./doio.c	Wed Dec 25 19:24:49 2002
@@ -775,8 +775,8 @@ Perl_nextargv(pTHX_ register GV *gv)
 		    {
 			if (ckWARN_d(WARN_INPLACE))	
 			    Perl_warner(aTHX_ packWARN(WARN_INPLACE),
-			      "Can't do inplace edit: %s would not be unique",
-			      SvPVX(sv));
+			      "Can't do inplace edit: %"SVf" would not be unique",
+			      sv);
 			do_close(gv,FALSE);
 			continue;
 		    }
@@ -786,8 +786,8 @@ Perl_nextargv(pTHX_ register GV *gv)
 		    if (PerlLIO_rename(PL_oldname,SvPVX(sv)) < 0) {
 		        if (ckWARN_d(WARN_INPLACE))	
 			    Perl_warner(aTHX_ packWARN(WARN_INPLACE),
-			      "Can't rename %s to %s: %s, skipping file",
-			      PL_oldname, SvPVX(sv), Strerror(errno) );
+			      "Can't rename %s to %"SVf": %s, skipping file",
+			      PL_oldname, sv, Strerror(errno) );
 			do_close(gv,FALSE);
 			continue;
 		    }
@@ -802,8 +802,8 @@ Perl_nextargv(pTHX_ register GV *gv)
 		    if (link(PL_oldname,SvPVX(sv)) < 0) {
 		        if (ckWARN_d(WARN_INPLACE))	
 			    Perl_warner(aTHX_ packWARN(WARN_INPLACE),
-			      "Can't rename %s to %s: %s, skipping file",
-			      PL_oldname, SvPVX(sv), Strerror(errno) );
+			      "Can't rename %s to %"SVf": %s, skipping file",
+			      PL_oldname, sv, Strerror(errno) );
 			do_close(gv,FALSE);
 			continue;
 		    }
--- ./dump.c.orig	Sat Dec 14 23:46:34 2002
+++ ./dump.c	Wed Dec 25 19:34:53 2002
@@ -73,7 +73,7 @@ Perl_dump_sub(pTHX_ GV *gv)
     SV *sv = sv_newmortal();
 
     gv_fullname3(sv, gv, Nullch);
-    Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nSUB %s = ", SvPVX(sv));
+    Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nSUB %"SVf" = ", sv);
     if (CvXSUB(GvCV(gv)))
 	Perl_dump_indent(aTHX_ 0, Perl_debug_log, "(xsub 0x%"UVxf" %d)\n",
 	    PTR2UV(CvXSUB(GvCV(gv))),
@@ -90,7 +90,7 @@ Perl_dump_form(pTHX_ GV *gv)
     SV *sv = sv_newmortal();
 
     gv_fullname3(sv, gv, Nullch);
-    Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nFORMAT %s = ", SvPVX(sv));
+    Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nFORMAT %"SVf" = ", sv);
     if (CvROOT(GvFORM(gv)))
 	op_dump(CvROOT(GvFORM(gv)));
     else
@@ -619,11 +619,10 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO 
 #else
 	if (cSVOPo->op_sv) {
 	    SV *tmpsv = NEWSV(0,0);
-	    STRLEN n_a;
 	    ENTER;
 	    SAVEFREESV(tmpsv);
 	    gv_fullname3(tmpsv, (GV*)cSVOPo->op_sv, Nullch);
-	    Perl_dump_indent(aTHX_ level, file, "GV = %s\n", SvPV(tmpsv, n_a));
+	    Perl_dump_indent(aTHX_ level, file, "GV = %"SVf"\n", tmpsv);
 	    LEAVE;
 	}
 	else
@@ -719,10 +718,10 @@ Perl_gv_dump(pTHX_ GV *gv)
     sv = sv_newmortal();
     PerlIO_printf(Perl_debug_log, "{\n");
     gv_fullname3(sv, gv, Nullch);
-    Perl_dump_indent(aTHX_ 1, Perl_debug_log, "GV_NAME = %s", SvPVX(sv));
+    Perl_dump_indent(aTHX_ 1, Perl_debug_log, "GV_NAME = %"SVf"", sv);
     if (gv != GvEGV(gv)) {
 	gv_efullname3(sv, GvEGV(gv), Nullch);
-	Perl_dump_indent(aTHX_ 1, Perl_debug_log, "-> %s", SvPVX(sv));
+	Perl_dump_indent(aTHX_ 1, Perl_debug_log, "-> %"SVf"", sv);
     }
     PerlIO_putc(Perl_debug_log, '\n');
     Perl_dump_indent(aTHX_ 0, Perl_debug_log, "}\n");
@@ -926,7 +925,6 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO 
     char *s;
     U32 flags;
     U32 type;
-    STRLEN n_a;
 
     if (!sv) {
 	Perl_dump_indent(aTHX_ level, file, "SV = 0\n");
@@ -1273,7 +1271,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO 
 	break;
     case SVt_PVCV:
 	if (SvPOK(sv))
-	    Perl_dump_indent(aTHX_ level, file, "  PROTOTYPE = \"%s\"\n", SvPV(sv,n_a));
+	    Perl_dump_indent(aTHX_ level, file, "  PROTOTYPE = \"%"SVf"\"\n", sv);
 	/* FALL THROUGH */
     case SVt_PVFM:
 	do_hv_dump(level, file, "  COMP_STASH", CvSTASH(sv));
@@ -1405,7 +1403,6 @@ Perl_debop(pTHX_ OP *o)
     AV *padlist, *comppad;
     CV *cv;
     SV *sv;
-    STRLEN n_a;
 
     if (CopSTASH_eq(PL_curcop, PL_debstash) && !DEBUG_J_TEST_)
 	return 0;
@@ -1420,7 +1417,7 @@ Perl_debop(pTHX_ OP *o)
 	if (cGVOPo_gv) {
 	    sv = NEWSV(0,0);
 	    gv_fullname3(sv, cGVOPo_gv, Nullch);
-	    PerlIO_printf(Perl_debug_log, "(%s)", SvPV(sv, n_a));
+	    PerlIO_printf(Perl_debug_log, "(%s)", SvPV_nolen(sv));
 	    SvREFCNT_dec(sv);
 	}
 	else
--- ./gv.c.orig	Tue Nov 19 12:58:18 2002
+++ ./gv.c	Wed Dec 25 21:18:40 2002
@@ -254,8 +254,8 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const
 	    HV* basestash = gv_stashsv(sv, FALSE);
 	    if (!basestash) {
 		if (ckWARN(WARN_MISC))
-		    Perl_warner(aTHX_ packWARN(WARN_MISC), "Can't locate package %s for @%s::ISA",
-			SvPVX(sv), HvNAME(stash));
+		    Perl_warner(aTHX_ packWARN(WARN_MISC), "Can't locate package %"SVf" for @%s::ISA",
+			sv, HvNAME(stash));
 		continue;
 	    }
 	    gv = gv_fetchmeth(basestash, name, len,
@@ -1328,21 +1328,19 @@ Perl_Gv_AMupdate(pTHX_ HV *stash)
 		/* GvSV contains the name of the method. */
 		GV *ngv = Nullgv;
 		
-		DEBUG_o( Perl_deb(aTHX_ "Resolving method `%.256s' for overloaded `%s' in package `%.256s'\n",
-			     SvPV_nolen(GvSV(gv)), cp, HvNAME(stash)) );
+		DEBUG_o( Perl_deb(aTHX_ "Resolving method `%.256"SVf"' for overloaded `%s' in package `%.256s'\n",
+			     GvSV(gv), cp, HvNAME(stash)) );
 		if (!SvPOK(GvSV(gv))
 		    || !(ngv = gv_fetchmethod_autoload(stash, SvPVX(GvSV(gv)),
 						       FALSE)))
 		{
 		    /* Can be an import stub (created by `can'). */
-		    if (GvCVGEN(gv)) {
-			Perl_croak(aTHX_ "Stub found while resolving method `%.256s' overloading `%s' in package `%.256s'",
-			      (SvPOK(GvSV(gv)) ?  SvPVX(GvSV(gv)) : "???" ),
-			      cp, HvNAME(stash));
-		    } else
-			Perl_croak(aTHX_ "Can't resolve method `%.256s' overloading `%s' in package `%.256s'",
-			      (SvPOK(GvSV(gv)) ?  SvPVX(GvSV(gv)) : "???" ),
-			      cp, HvNAME(stash));
+		    SV *gvsv = GvSV(gv);
+		    const char *name = SvPOK(gvsv) ?  SvPVX(gvsv) : "???";
+		    Perl_croak(aTHX_ "%s method `%.256s' overloading `%s' in package `%.256s'",
+			       (GvCVGEN(gv) ? "Stub found while resolving"
+				: "Can't resolve"),
+			       name, cp, HvNAME(stash));
 		}
 		cv = GvCV(gv = ngv);
 	    }
--- ./op.c.orig	Sat Dec 14 23:46:34 2002
+++ ./op.c	Wed Dec 25 20:47:08 2002
@@ -152,8 +152,8 @@ STATIC void
 S_no_bareword_allowed(pTHX_ OP *o)
 {
     qerror(Perl_mess(aTHX_
-		     "Bareword \"%s\" not allowed while \"strict subs\" in use",
-		     SvPV_nolen(cSVOPo_sv)));
+		     "Bareword \"%"SVf"\" not allowed while \"strict subs\" in use",
+		     cSVOPo_sv));
 }
 
 /* "register" allocation */
@@ -3821,7 +3821,7 @@ Perl_cv_ckproto(pTHX_ CV *cv, GV *gv, ch
 	if (name)
 	    Perl_sv_catpvf(aTHX_ msg, " sub %"SVf, name);
 	if (SvPOK(cv))
-	    Perl_sv_catpvf(aTHX_ msg, " (%s)", SvPVX(cv));
+	    Perl_sv_catpvf(aTHX_ msg, " (%"SVf")", (SV *)cv);
 	sv_catpv(msg, " vs ");
 	if (p)
 	    Perl_sv_catpvf(aTHX_ msg, "(%s)", p);
@@ -4136,7 +4136,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, 
 		else {
 		    /* force display of errors found but not reported */
 		    sv_catpv(ERRSV, not_safe);
-		    Perl_croak(aTHX_ "%s", SvPVx(ERRSV, n_a));
+		    Perl_croak(aTHX_ "%"SVf, ERRSV);
 		}
 	    }
 	}
@@ -5991,8 +5991,8 @@ Perl_ck_subr(pTHX_ OP *o)
 		continue;
 	    default:
 	      oops:
-		Perl_croak(aTHX_ "Malformed prototype for %s: %s",
-			   gv_ename(namegv), SvPV((SV*)cv, n_a));
+		Perl_croak(aTHX_ "Malformed prototype for %s: %"SVf,
+			   gv_ename(namegv), cv);
 	    }
 	}
 	else
@@ -6197,8 +6197,8 @@ Perl_peep(pTHX_ register OP *o)
 		    SV *sv = sv_newmortal();
 		    gv_efullname3(sv, gv, Nullch);
 		    Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE),
-				"%s() called too early to check prototype",
-				SvPV_nolen(sv));
+				"%"SVf"() called too early to check prototype",
+				sv);
 		}
 	    }
 	    else if (o->op_next->op_type == OP_READLINE
--- ./pad.c.orig	Tue Dec 17 11:18:47 2002
+++ ./pad.c	Wed Dec 25 21:20:45 2002
@@ -878,8 +878,8 @@ Perl_intro_my(pTHX)
 	    SvIVX(sv) = PAD_MAX;	/* Don't know scope end yet. */
 	    SvNVX(sv) = (NV)PL_cop_seqmax;
 	    DEBUG_Xv(PerlIO_printf(Perl_debug_log,
-		"Pad intromy: %ld \"%s\", (%lu,%lu)\n",
-		(long)i, SvPVX(sv),
+		"Pad intromy: %ld \"%"SVf"\", (%lu,%lu)\n",
+		(long)i, sv,
 		(unsigned long)I_32(SvNVX(sv)), (unsigned long)SvIVX(sv))
 	    );
 	}
@@ -916,7 +916,7 @@ Perl_pad_leavemy(pTHX)
 	    if ((sv = svp[off]) && sv != &PL_sv_undef
 		    && !SvFAKE(sv) && ckWARN_d(WARN_INTERNAL))
 		Perl_warner(aTHX_ packWARN(WARN_INTERNAL),
-					"%s never introduced", SvPVX(sv));
+					"%"SVf" never introduced", sv);
 	}
     }
     /* "Deintroduce" my variables that are leaving with this scope. */
@@ -926,8 +926,8 @@ Perl_pad_leavemy(pTHX)
 	{
 	    SvIVX(sv) = PL_cop_seqmax;
 	    DEBUG_Xv(PerlIO_printf(Perl_debug_log,
-		"Pad leavemy: %ld \"%s\", (%lu,%lu)\n",
-		(long)off, SvPVX(sv),
+		"Pad leavemy: %ld \"%"SVf"\", (%lu,%lu)\n",
+		(long)off, sv,
 		(unsigned long)I_32(SvNVX(sv)), (unsigned long)SvIVX(sv))
 	    );
 	}
@@ -1175,21 +1175,21 @@ Perl_do_dump_pad(pTHX_ I32 level, PerlIO
 	if (namesv) {
 	    if (SvFAKE(namesv))
 		Perl_dump_indent(aTHX_ level+1, file,
-		    "%2d. 0x%"UVxf"<%lu> FAKE \"%s\"\n",
+		    "%2d. 0x%"UVxf"<%lu> FAKE \"%"SVf"\"\n",
 		    (int) ix,
 		    PTR2UV(ppad[ix]),
 		    (unsigned long) (ppad[ix] ? SvREFCNT(ppad[ix]) : 0),
-		    SvPVX(namesv)
+		    namesv
 		);
 	    else
 		Perl_dump_indent(aTHX_ level+1, file,
-		    "%2d. 0x%"UVxf"<%lu> (%lu,%lu) \"%s\"\n",
+		    "%2d. 0x%"UVxf"<%lu> (%lu,%lu) \"%"SVf"\"\n",
 		    (int) ix,
 		    PTR2UV(ppad[ix]),
 		    (unsigned long) (ppad[ix] ? SvREFCNT(ppad[ix]) : 0),
 		    (unsigned long)I_32(SvNVX(namesv)),
 		    (unsigned long)SvIVX(namesv),
-		    SvPVX(namesv)
+		    namesv
 		);
 	}
 	else if (full) {
--- ./perl.c.orig	Tue Dec  3 14:01:45 2002
+++ ./perl.c	Wed Dec 25 21:25:07 2002
@@ -3908,7 +3908,6 @@ Perl_call_list(pTHX_ I32 oldscope, AV *p
 	    atsv = ERRSV;
 	    (void)SvPV(atsv, len);
 	    if (len) {
-		STRLEN n_a;
 		PL_curcop = &PL_compiling;
 		CopLINE_set(PL_curcop, oldline);
 		if (paramList == PL_beginav)
@@ -3922,7 +3921,7 @@ Perl_call_list(pTHX_ I32 oldscope, AV *p
 		while (PL_scopestack_ix > oldscope)
 		    LEAVE;
 		JMPENV_POP;
-		Perl_croak(aTHX_ "%s", SvPVx(atsv, n_a));
+		Perl_croak(aTHX_ "%"SVf"", atsv);
 	    }
 	    break;
 	case 1:
--- ./pp_ctl.c.orig	Mon Dec 16 23:12:38 2002
+++ ./pp_ctl.c	Wed Dec 25 23:00:14 2002
@@ -1820,7 +1820,7 @@ PP(pp_return)
 	    /* Unassume the success we assumed earlier. */
 	    SV *nsv = cx->blk_eval.old_namesv;
 	    (void)hv_delete(GvHVn(PL_incgv), SvPVX(nsv), SvCUR(nsv), G_DISCARD);
-	    DIE(aTHX_ "%s did not return a true value", SvPVX(nsv));
+	    DIE(aTHX_ "%"SVf" did not return a true value", nsv);
 	}
 	break;
     case CXt_FORMAT:
@@ -2108,7 +2108,7 @@ PP(pp_goto)
 			goto retry;
 		    tmpstr = sv_newmortal();
 		    gv_efullname3(tmpstr, gv, Nullch);
-		    DIE(aTHX_ "Goto undefined subroutine &%s",SvPVX(tmpstr));
+		    DIE(aTHX_ "Goto undefined subroutine &%"SVf"",tmpstr);
 		}
 		DIE(aTHX_ "Goto undefined subroutine");
 	    }
@@ -3363,7 +3363,7 @@ PP(pp_leaveeval)
 	/* Unassume the success we assumed earlier. */
 	SV *nsv = cx->blk_eval.old_namesv;
 	(void)hv_delete(GvHVn(PL_incgv), SvPVX(nsv), SvCUR(nsv), G_DISCARD);
-	retop = Perl_die(aTHX_ "%s did not return a true value", SvPVX(nsv));
+	retop = Perl_die(aTHX_ "%"SVf" did not return a true value", nsv);
 	/* die_where() did LEAVE, or we won't be here */
     }
     else {
--- ./pp_hot.c.orig	Mon Dec 23 06:17:44 2002
+++ ./pp_hot.c	Wed Dec 25 18:23:52 2002
@@ -2696,7 +2696,7 @@ try_autoload:
 	    else {
 		sub_name = sv_newmortal();
 		gv_efullname3(sub_name, gv, Nullch);
-		DIE(aTHX_ "Undefined subroutine &%s called", SvPVX(sub_name));
+		DIE(aTHX_ "Undefined subroutine &%"SVf" called", sub_name);
 	    }
 	}
 	if (!cv)
@@ -2713,8 +2713,8 @@ Perl_sub_crush_depth(pTHX_ CV *cv)
     else {
 	SV* tmpstr = sv_newmortal();
 	gv_efullname3(tmpstr, CvGV(cv), Nullch);
-	Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on subroutine \"%s\"",
-		SvPVX(tmpstr));
+	Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on subroutine \"%"SVf"\"",
+		tmpstr);
     }
 }
 
@@ -2730,7 +2730,7 @@ PP(pp_aelem)
     SV *sv;
 
     if (SvROK(elemsv) && !SvGAMAGIC(elemsv) && ckWARN(WARN_MISC))
-	Perl_warner(aTHX_ packWARN(WARN_MISC), "Use of reference \"%s\" as array index", SvPV_nolen(elemsv));
+	Perl_warner(aTHX_ packWARN(WARN_MISC), "Use of reference \"%"SVf"\" as array index", elemsv);
     if (elem > 0)
 	elem -= PL_curcop->cop_arybase;
     if (SvTYPE(av) != SVt_PVAV)
--- ./pp_sort.c.orig	Sat Oct 19 16:21:46 2002
+++ ./pp_sort.c	Wed Dec 25 21:36:45 2002
@@ -1455,8 +1455,8 @@ PP(pp_sort)
 		else if (gv) {
 		    SV *tmpstr = sv_newmortal();
 		    gv_efullname3(tmpstr, gv, Nullch);
-		    DIE(aTHX_ "Undefined sort subroutine \"%s\" called",
-			SvPVX(tmpstr));
+		    DIE(aTHX_ "Undefined sort subroutine \"%"SVf"\" called",
+			tmpstr);
 		}
 		else {
 		    DIE(aTHX_ "Undefined subroutine in sort");
--- ./pp_sys.c.orig	Wed Dec 18 03:20:13 2002
+++ ./pp_sys.c	Wed Dec 25 21:40:54 2002
@@ -762,7 +762,6 @@ PP(pp_tie)
     char *methname;
     int how = PERL_MAGIC_tied;
     U32 items;
-    STRLEN n_a;
 
     varsv = *++MARK;
     switch(SvTYPE(varsv)) {
@@ -809,8 +808,8 @@ PP(pp_tie)
 	 */
 	stash = gv_stashsv(*MARK, FALSE);
 	if (!stash || !(gv = gv_fetchmethod(stash, methname))) {
-	    DIE(aTHX_ "Can't locate object method \"%s\" via package \"%s\"",
-		 methname, SvPV(*MARK,n_a));
+	    DIE(aTHX_ "Can't locate object method \"%s\" via package \"%"SVf"\"",
+		 methname, *MARK);
 	}
 	ENTER;
 	PUSHSTACKi(PERLSI_MAGIC);
--- ./sv.c.orig	Wed Dec 25 03:39:53 2002
+++ ./sv.c	Wed Dec 25 19:24:59 2002
@@ -6913,7 +6913,7 @@ Perl_sv_2io(pTHX_ SV *sv)
 	else
 	    io = 0;
 	if (!io)
-	    Perl_croak(aTHX_ "Bad filehandle: %s", SvPV(sv,n_a));
+	    Perl_croak(aTHX_ "Bad filehandle: %"SVf, sv);
 	break;
     }
     return io;
@@ -6994,7 +6994,8 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **st, GV **
 		   Nullop);
 	    LEAVE;
 	    if (!GvCVu(gv))
-		Perl_croak(aTHX_ "Unable to create sub named \"%s\"", SvPV(sv,n_a));
+		Perl_croak(aTHX_ "Unable to create sub named \"%"SVf"\"",
+			   sv);
 	}
 	return GvCVu(gv);
     }
@@ -8720,8 +8721,8 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const cha
 	    if (!args && ckWARN(WARN_PRINTF) &&
 		  (PL_op->op_type == OP_PRTF || PL_op->op_type == OP_SPRINTF)) {
 		SV *msg = sv_newmortal();
-		Perl_sv_setpvf(aTHX_ msg, "Invalid conversion in %s: ",
-			  (PL_op->op_type == OP_PRTF) ? "printf" : "sprintf");
+		Perl_sv_setpvf(aTHX_ msg, "Invalid conversion in %sprintf: ",
+			  (PL_op->op_type == OP_PRTF) ? "" : "s");
 		if (c) {
 		    if (isPRINT(c))
 			Perl_sv_catpvf(aTHX_ msg,
@@ -9359,8 +9360,9 @@ Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS
 
 #ifdef DEBUGGING
     if (SvANY(sstr) && PL_watch_pvx && SvPVX(sstr) == PL_watch_pvx)
-	PerlIO_printf(Perl_debug_log, "watch at %p hit, found string \"%s\"\n",
-		      PL_watch_pvx, SvPVX(sstr));
+	PerlIO_printf(Perl_debug_log,
+		      "watch at %p hit, found string \"%"SVf"\"\n",
+		      PL_watch_pvx, sstr);
 #endif
 
     switch (SvTYPE(sstr)) {
--- ./toke.c.orig	Fri Dec  6 22:38:55 2002
+++ ./toke.c	Wed Dec 25 22:06:23 2002
@@ -5037,8 +5037,8 @@ Perl_yylex(pTHX)
 		    d[tmp] = '\0';
 		    if (bad_proto && ckWARN(WARN_SYNTAX))
 			Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
-				    "Illegal character in prototype for %s : %s",
-				    SvPVX(PL_subname), d);
+				    "Illegal character in prototype for %"SVf" : %s",
+				    PL_subname, d);
 		    SvCUR(PL_lex_stuff) = tmp;
 		    have_proto = TRUE;
 
--- ./universal.c.orig	Mon Dec 23 06:22:51 2002
+++ ./universal.c	Wed Dec 25 22:07:34 2002
@@ -94,8 +94,8 @@ S_isa_lookup(pTHX_ HV *stash, const char
 		if (!basestash) {
 		    if (ckWARN(WARN_MISC))
 			Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
-		             "Can't locate package %s for @%s::ISA",
-			    SvPVX(sv), HvNAME(stash));
+		             "Can't locate package %"SVf" for @%s::ISA",
+			    sv, HvNAME(stash));
 		    continue;
 		}
 		if (&PL_sv_yes == isa_lookup(basestash, name, name_stash, 
--- ./utf8.c.orig	Thu Sep 26 12:04:58 2002
+++ ./utf8.c	Wed Dec 25 22:08:40 2002
@@ -1564,8 +1564,8 @@ Perl_swash_init(pTHX_ char* pkg, char* n
     }
     if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) {
         if (SvPOK(retval))
-	    Perl_croak(aTHX_ "Can't find Unicode property definition \"%s\"",
-		       SvPV_nolen(retval));
+	    Perl_croak(aTHX_ "Can't find Unicode property definition \"%"SVf"\"",
+		       retval);
 	Perl_croak(aTHX_ "SWASHNEW didn't return an HV ref");
     }
     return retval;
--- ext/Data/Dumper/Dumper.xs.orig	Tue Jul  9 20:54:54 2002
+++ ext/Data/Dumper/Dumper.xs	Wed Dec 25 22:28:11 2002
@@ -252,8 +252,7 @@ DD_dump(pTHX_ SV *val, char *name, STRLE
 	    i = perl_call_method(SvPVX(freezer), G_EVAL|G_SCALAR);
 	    SPAGAIN;
 	    if (SvTRUE(ERRSV))
-		warn("WARNING(Freezer method call failed): %s",
-		     SvPVX(ERRSV));
+		warn("WARNING(Freezer method call failed): %"SVf"", ERRSV);
 	    else if (i)
 		val = newSVsv(POPs);
 	    PUTBACK; FREETMPS; LEAVE;

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About