[perl #50538] when( @n && %n ) fails to smart match
[p5sagit/p5-mst-13.2.git] / overload.pl
index 6b1050e..0c25cdf 100644 (file)
@@ -70,6 +70,7 @@ EOF
 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] = {
 EOF
@@ -83,7 +84,7 @@ print C <<"EOT";
     $lastlen
 };
 
-char * const PL_AMG_names[NofAMmeth] = {
+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