nwc10+ (Nicholas Clark)
2006-01-10 10:45:01 UTC
Change 26763 by ***@nicholas-saigo on 2006/01/10 10:44:50
Integrate:
[ 24925]
Trim trailing whitespace from $! and $^E
(Fixes lib/Test/Simple/t/fail-more.t with bcc32 on Win32, and is
good for consistency anyway)
Affected files ...
... //depot/maint-5.8/perl/mg.c#94 integrate
Differences ...
==== //depot/maint-5.8/perl/mg.c#94 (text) ====
Index: perl/mg.c
--- perl/mg.c#93~26689~ 2006-01-06 15:03:51.000000000 -0800
+++ perl/mg.c 2006-01-10 02:44:50.000000000 -0800
@@ -569,6 +569,13 @@
return 0;
}
+#define SvRTRIM(sv) STMT_START { \
+ STRLEN len = SvCUR(sv); \
+ while (len > 0 && isSPACE(SvPVX(sv)[len-1])) \
+ --len; \
+ SvCUR_set(sv, len); \
+} STMT_END
+
int
Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
{
@@ -652,6 +659,7 @@
#endif
#endif
#endif
+ SvRTRIM(sv);
SvNOK_on(sv); /* what a wonderful hack! */
}
else if (strEQ(remaining, "NCODING"))
@@ -911,6 +919,7 @@
errno = saveerrno;
}
#endif
+ SvRTRIM(sv);
SvNOK_on(sv); /* what a wonderful hack! */
break;
case '<':
End of Patch.
Integrate:
[ 24925]
Trim trailing whitespace from $! and $^E
(Fixes lib/Test/Simple/t/fail-more.t with bcc32 on Win32, and is
good for consistency anyway)
Affected files ...
... //depot/maint-5.8/perl/mg.c#94 integrate
Differences ...
==== //depot/maint-5.8/perl/mg.c#94 (text) ====
Index: perl/mg.c
--- perl/mg.c#93~26689~ 2006-01-06 15:03:51.000000000 -0800
+++ perl/mg.c 2006-01-10 02:44:50.000000000 -0800
@@ -569,6 +569,13 @@
return 0;
}
+#define SvRTRIM(sv) STMT_START { \
+ STRLEN len = SvCUR(sv); \
+ while (len > 0 && isSPACE(SvPVX(sv)[len-1])) \
+ --len; \
+ SvCUR_set(sv, len); \
+} STMT_END
+
int
Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
{
@@ -652,6 +659,7 @@
#endif
#endif
#endif
+ SvRTRIM(sv);
SvNOK_on(sv); /* what a wonderful hack! */
}
else if (strEQ(remaining, "NCODING"))
@@ -911,6 +919,7 @@
errno = saveerrno;
}
#endif
+ SvRTRIM(sv);
SvNOK_on(sv); /* what a wonderful hack! */
break;
case '<':
End of Patch.