diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-10-16 16:02:35 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-10-16 16:02:35 +0000 |
commit | 07722ef351669997c85468614cea480d7fe1bd25 (patch) | |
tree | 3ea5346f672c31284bdb8657b4e964ff2a29eb4b /overload.h | |
parent | 270597db85fe825515c4f52d5e9897a0480467bf (diff) | |
download | perl-07722ef351669997c85468614cea480d7fe1bd25.tar.gz |
PL_AMG_names is only used by gv.c (as far as Google code search can
see), so it can easily be a static variable inside gv.c. This allows
the implementation to be changed in future Perls within the 5.10.x
series.
p4raw-id: //depot/perl@32116
Diffstat (limited to 'overload.h')
-rw-r--r-- | overload.h | 84 |
1 files changed, 2 insertions, 82 deletions
diff --git a/overload.h b/overload.h index adf1feae2d..1750585122 100644 --- a/overload.h +++ b/overload.h @@ -2,8 +2,8 @@ * * overload.h * - * Copyright (C) 1997, 1998, 2000, 2001, 2005 and 2006 by Larry Wall and - * others + * Copyright (C) 1997, 1998, 2000, 2001, 2005, 2006, 2007 by Larry Wall + * and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -84,85 +84,5 @@ enum { /* Do not leave a trailing comma here. C9X allows it, C89 doesn't. */ }; - #define NofAMmeth max_amg_code -#define AMG_id2name(id) (PL_AMG_names[id]+1) -#ifdef DOINIT -EXTCONST 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 - 'nomethod' only), the only other place which has it hardwired is - overload.pm. */ - "()", - "(${}", - "(@{}", - "(%{}", - "(*{}", - "(&{}", - "(++", - "(--", - "(bool", - "(0+", - "(\"\"", - "(!", - "(=", - "(abs", - "(neg", - "(<>", - "(int", - "(<", - "(<=", - "(>", - "(>=", - "(==", - "(!=", - "(lt", - "(le", - "(gt", - "(ge", - "(eq", - "(ne", - "(nomethod", - "(+", - "(+=", - "(-", - "(-=", - "(*", - "(*=", - "(/", - "(/=", - "(%", - "(%=", - "(**", - "(**=", - "(<<", - "(<<=", - "(>>", - "(>>=", - "(&", - "(&=", - "(|", - "(|=", - "(^", - "(^=", - "(<=>", - "(cmp", - "(~", - "(atan2", - "(cos", - "(sin", - "(exp", - "(log", - "(sqrt", - "(x", - "(x=", - "(.", - "(.=", - "(~~", - "DESTROY" -}; -#else -EXTCONST char * PL_AMG_names[NofAMmeth]; -#endif /* def INITAMAGIC */ |