Change 33310 by [EMAIL PROTECTED] on 2008/02/14 15:44:14
Subject: [PATCH] doio.c:Perl_my_lstat:/* XXX Do really need to be
calling SvPV() all these times? */
From: "Vincent Pit" <[EMAIL PROTECTED]>
Date: Thu, 14 Feb 2008 15:21:29 +0100 (CET)
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/doio.c#368 edit
... //depot/perl/t/lib/warnings/9uninit#19 edit
Differences ...
==== //depot/perl/doio.c#368 (text) ====
Index: perl/doio.c
--- perl/doio.c#367~33291~ 2008-02-12 05:15:20.000000000 -0800
+++ perl/doio.c 2008-02-14 07:44:14.000000000 -0800
@@ -1343,6 +1343,7 @@
static const char no_prev_lstat[] = "The stat preceding -l _ wasn't an
lstat";
dSP;
SV *sv;
+ const char *file;
if (PL_op->op_flags & OPf_REF) {
EXTEND(SP,1);
if (cGVOP_gv == PL_defgv) {
@@ -1369,10 +1370,10 @@
GvENAME((GV*) SvRV(sv)));
return (PL_laststatval = -1);
}
- /* XXX Do really need to be calling SvPV() all these times? */
- sv_setpv(PL_statname,SvPV_nolen_const(sv));
- PL_laststatval = PerlLIO_lstat(SvPV_nolen_const(sv),&PL_statcache);
- if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) &&
strchr(SvPV_nolen_const(sv), '\n'))
+ file = SvPV_nolen_const(sv);
+ sv_setpv(PL_statname,file);
+ PL_laststatval = PerlLIO_lstat(file,&PL_statcache);
+ if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(file, '\n'))
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "lstat");
return PL_laststatval;
}
==== //depot/perl/t/lib/warnings/9uninit#19 (text) ====
Index: perl/t/lib/warnings/9uninit
--- perl/t/lib/warnings/9uninit#18~33088~ 2008-01-28 05:10:48.000000000
-0800
+++ perl/t/lib/warnings/9uninit 2008-02-14 07:44:14.000000000 -0800
@@ -1287,7 +1287,6 @@
Use of uninitialized value $m1 in -d at - line 28.
Use of uninitialized value $m1 in -p at - line 29.
Use of uninitialized value $m1 in -l at - line 30.
-Use of uninitialized value $m1 in -l at - line 30.
Use of uninitialized value $m1 in -u at - line 31.
Use of uninitialized value $m1 in -g at - line 32.
Use of uninitialized value $m1 in -t at - line 34.
End of Patch.