develooper Front page | perl.perl5.porters | Postings from April 2008

[PATCH] Make PL_AMG_names and PL_AMG_namelens static

Thread Next
From:
Jan Dubois
Date:
April 3, 2008 18:50
Subject:
[PATCH] Make PL_AMG_names and PL_AMG_namelens static
Message ID:
02c401c895f6$369e8130$a3db8390$@com
I noticed that 5.8.9-tobe was adding another exported symbol that probably
shouldn't be exported: PL_AMG_namelens.  And at least in 5.11 and 5.10 we
can also make PL_AMG_names static, as it is no longer listed in globvar.sym.

Cheers,
-Jan

Patch against blead:

--- overload.c.orig     2007-12-20 13:53:20.000000000 -0800
+++ overload.c  2008-04-03 18:44:57.703942400 -0700
@@ -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 @@
     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

--- overload.pl.orig    2008-03-16 17:19:43.000000000 -0700
+++ overload.pl 2008-04-03 18:44:38.866856000 -0700
@@ -70,7 +70,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] = {
 EOF

 my $last = pop @names;
@@ -82,7 +82,7 @@
     $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
End of Patch.


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