X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=overload.c;h=909a0ee529adcb5c8b0e1462314f94e2efcfbcec;hb=f4a6a713802da1b781d7108503156fa3a0fe219e;hp=0a220cc4de7c308a92d392f05f282f933000a369;hpb=8261f8eb698db59828f3e3dd7a1ee82976ab259e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/overload.c b/overload.c index 0a220cc..909a0ee 100644 --- a/overload.c +++ b/overload.c @@ -13,8 +13,80 @@ */ #define AMG_id2name(id) (PL_AMG_names[id]+1) +#define AMG_id2namelen(id) (PL_AMG_namelens[id]-1) -char * const PL_AMG_names[NofAMmeth] = { +static const U8 PL_AMG_namelens[NofAMmeth] = { + 2, + 4, + 4, + 4, + 4, + 4, + 3, + 3, + 5, + 3, + 3, + 2, + 2, + 4, + 4, + 3, + 4, + 2, + 3, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 9, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 2, + 3, + 3, + 4, + 3, + 4, + 3, + 4, + 2, + 3, + 2, + 3, + 2, + 3, + 4, + 4, + 2, + 6, + 4, + 4, + 4, + 4, + 5, + 2, + 3, + 2, + 3, + 3, + 3, + 7 +}; + +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 @@ -86,5 +158,6 @@ char * const PL_AMG_names[NofAMmeth] = { "(.", "(.=", "(~~", + "(-X", "DESTROY" };