This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Provide the names of the magic vtables in PL_magic_vtable_names[].
[perl5.git] / mg_vtable.h
index 52937d7..516d2c9 100644 (file)
@@ -40,6 +40,43 @@ enum {               /* pass one of these to get_vtbl */
     magic_vtable_max
 };
 
+#ifdef DOINIT
+EXTCONST char *PL_magic_vtable_names[magic_vtable_max] = {
+    "sv",
+    "env",
+    "envelem",
+    "sigelem",
+    "pack",
+    "packelem",
+    "dbline",
+    "isa",
+    "isaelem",
+    "arylen",
+    "arylen_p",
+    "mglob",
+    "nkeys",
+    "taint",
+    "substr",
+    "vec",
+    "pos",
+    "uvar",
+    "defelem",
+    "regexp",
+    "regdata",
+    "regdatum",
+    "amagic",
+    "amagicelem",
+    "backref",
+    "ovrld",
+    "utf8",
+    "collxfrm",
+    "hintselem",
+    "hints"
+};
+#else
+EXTCONST char *PL_magic_vtable_names[magic_vtable_max];
+#endif
+
 /* These all need to be 0, not NULL, as NULL can be (void*)0, which is a
  * pointer to data, whereas we're assigning pointers to functions, which are
  * not the same beast. ANSI doesn't allow the assignment from one to the other.