Change 30061 by [EMAIL PROTECTED] on 2007/01/29 17:39:20
Integrate:
[ 29008]
Don't bother checking for bad characters in prototypes if we're not
going to warn about them.
[ 29028]
Less brace nesting.
[ 29042]
Using explicit printf-like APIs with a format of "%s" isn't the world's
most efficient idea.
[ 29068]
Quiet a warning in pp_sys.c on AIX.
[ 29157]
VOL should be used instead of volatile in the core.
[ 29190]
This volatile modifier is not on the referent, but on the pointer
(see change 28606)
Affected files ...
... //depot/maint-5.8/perl/XSUB.h#38 integrate
... //depot/maint-5.8/perl/dump.c#74 integrate
... //depot/maint-5.8/perl/op.c#191 integrate
... //depot/maint-5.8/perl/perl.c#196 integrate
... //depot/maint-5.8/perl/pp_sys.c#140 integrate
... //depot/maint-5.8/perl/toke.c#158 integrate
Differences ...
==== //depot/maint-5.8/perl/dump.c#74 (text) ====
Index: perl/dump.c
--- perl/dump.c#73~30040~ 2007-01-27 10:56:32.000000000 -0800
+++ perl/dump.c 2007-01-29 09:39:20.000000000 -0800
@@ -274,12 +274,12 @@
sv_setpvn(dsv, "", 0);
if ( start_color != NULL )
- Perl_sv_catpvf( aTHX_ dsv, "%s", start_color);
+ Perl_sv_catpv( aTHX_ dsv, start_color);
pv_escape( dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR
);
if ( end_color != NULL )
- Perl_sv_catpvf( aTHX_ dsv, "%s", end_color);
+ Perl_sv_catpv( aTHX_ dsv, end_color);
if ( dq == '"' )
sv_catpvn( dsv, "\"", 1 );
==== //depot/maint-5.8/perl/op.c#191 (text) ====
Index: perl/op.c
--- perl/op.c#190~30054~ 2007-01-28 15:29:04.000000000 -0800
+++ perl/op.c 2007-01-29 09:39:20.000000000 -0800
@@ -2079,8 +2079,8 @@
Perl_fold_constants(pTHX_ register OP *o)
{
register OP *curop;
- volatile I32 type = o->op_type;
- volatile SV *sv = NULL;
+ VOL I32 type = o->op_type;
+ SV * VOL sv = NULL;
int ret = 0;
I32 oldscope;
OP *old_next;
==== //depot/maint-5.8/perl/perl.c#196 (text) ====
Index: perl/perl.c
--- perl/perl.c#195~30006~ 2007-01-26 04:19:35.000000000 -0800
+++ perl/perl.c 2007-01-29 09:39:20.000000000 -0800
@@ -546,7 +546,7 @@
int
perl_destruct(pTHXx)
{
- volatile int destruct_level; /* 0=none, 1=full, 2=full with checks */
+ VOL int destruct_level; /* 0=none, 1=full, 2=full with checks */
HV *hv;
#ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP
pid_t child;
@@ -2668,7 +2668,7 @@
LOGOP myop; /* fake syntax tree node */
UNOP method_op;
I32 oldmark;
- volatile I32 retval = 0;
+ VOL I32 retval = 0;
I32 oldscope;
bool oldcatch = CATCH_GET;
int ret;
@@ -2830,8 +2830,8 @@
{
dSP;
UNOP myop; /* fake syntax tree node */
- volatile I32 oldmark = SP - PL_stack_base;
- volatile I32 retval = 0;
+ VOL I32 oldmark = SP - PL_stack_base;
+ VOL I32 retval = 0;
int ret;
OP* const oldop = PL_op;
dJMPENV;
==== //depot/maint-5.8/perl/pp_sys.c#140 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#139~30057~ 2007-01-29 07:55:07.000000000 -0800
+++ perl/pp_sys.c 2007-01-29 09:39:20.000000000 -0800
@@ -2965,7 +2965,7 @@
if (use_access) {
#if defined(HAS_ACCESS) || defined (PERL_EFF_ACCESS)
- const char *const name = POPpx;
+ const char *name = POPpx;
if (effective) {
# ifdef PERL_EFF_ACCESS
result = PERL_EFF_ACCESS(name, access_mode);
==== //depot/maint-5.8/perl/toke.c#158 (text) ====
Index: perl/toke.c
--- perl/toke.c#157~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/toke.c 2007-01-29 09:39:20.000000000 -0800
@@ -4519,7 +4519,8 @@
PL_last_lop = PL_oldbufptr;
PL_last_lop_op = OP_ENTERSUB;
/* Is there a prototype? */
- if (SvPOK(cv)) {
+ if (SvPOK(cv))
+ {
STRLEN protolen;
const char *proto = SvPV_const((SV*)cv, protolen);
if (!protolen)
@@ -5481,7 +5482,7 @@
char tmpbuf[sizeof PL_tokenbuf];
SSize_t tboffset = 0;
expectation attrful;
- bool have_name, have_proto, bad_proto;
+ bool have_name, have_proto;
const int key = tmp;
s = skipspace(s);
@@ -5525,6 +5526,8 @@
/* Look for a prototype */
if (*s == '(') {
char *p;
+ bool bad_proto = FALSE;
+ const bool warnsyntax = ckWARN(WARN_SYNTAX);
s = scan_str(s,FALSE,FALSE);
if (!s)
@@ -5532,16 +5535,15 @@
/* strip spaces and check for bad characters */
d = SvPVX(PL_lex_stuff);
tmp = 0;
- bad_proto = FALSE;
for (p = d; *p; ++p) {
if (!isSPACE(*p)) {
d[tmp++] = *p;
- if (!strchr("[EMAIL PROTECTED];[]&\\", *p))
+ if (warnsyntax && !strchr("[EMAIL
PROTECTED];[]&\\", *p))
bad_proto = TRUE;
}
}
d[tmp] = '\0';
- if (bad_proto && ckWARN(WARN_SYNTAX))
+ if (bad_proto)
Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
"Illegal character in prototype for %"SVf"
: %s",
(void*)PL_subname, d);
End of Patch.