From: Jan Dubois Date: Thu, 3 Apr 2008 18:50:08 +0000 (-0700) Subject: Make PL_AMG_names and PL_AMG_namelens static X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e1c5ef038e0e6c85edfb5ac0d6cc98f79121ef9;p=p5sagit%2Fp5-mst-13.2.git Make PL_AMG_names and PL_AMG_namelens static From: "Jan Dubois" Message-ID: <02c401c895f6$369e8130$a3db8390$@com> p4raw-id: //depot/perl@33645 --- diff --git a/overload.c b/overload.c index 0a1ea3d..2f1f870 100644 --- a/overload.c +++ b/overload.c @@ -15,7 +15,7 @@ #define AMG_id2name(id) (PL_AMG_names[id]+1) #define AMG_id2namelen(id) (PL_AMG_namelens[id]-1) -const U8 PL_AMG_namelens[NofAMmeth] = { +static const U8 PL_AMG_namelens[NofAMmeth] = { 2, 4, 4, @@ -85,7 +85,7 @@ const U8 PL_AMG_namelens[NofAMmeth] = { 7 }; -const char * const PL_AMG_names[NofAMmeth] = { +static const char * const PL_AMG_names[NofAMmeth] = { /* Names kept in the symbol table. fallback => "()", the rest has "(" prepended. The only other place in perl which knows about this convention is AMG_id2name (used for debugging output and diff --git a/overload.pl b/overload.pl index da1f91b..69808c6 100644 --- a/overload.pl +++ b/overload.pl @@ -70,7 +70,7 @@ print $c <<'EOF'; #define AMG_id2name(id) (PL_AMG_names[id]+1) #define AMG_id2namelen(id) (PL_AMG_namelens[id]-1) -const U8 PL_AMG_namelens[NofAMmeth] = { +static const U8 PL_AMG_namelens[NofAMmeth] = { EOF my $last = pop @names; @@ -82,7 +82,7 @@ print $c <<"EOT"; $lastlen }; -const char * const PL_AMG_names[NofAMmeth] = { +static const char * const PL_AMG_names[NofAMmeth] = { /* Names kept in the symbol table. fallback => "()", the rest has "(" prepended. The only other place in perl which knows about this convention is AMG_id2name (used for debugging output and