No need to create a new magic vtable if it's all 0 pointers.
Nicholas Clark [Sat, 7 Oct 2006 22:24:28 +0000 (22:24 +0000)]
[And these are function pointers, so they're not NULL :-)]

p4raw-id: //depot/perl@28962

XSUB.h
perl.h
sv.c

diff --git a/XSUB.h b/XSUB.h
index e4cc816..de5d33b 100644 (file)
--- a/XSUB.h
+++ b/XSUB.h
@@ -391,7 +391,6 @@ Rethrows a previously caught exception.  See L<perlguts/"Exception Handling">.
 #  define VTBL_uvar            &PL_vtbl_uvar
 #  define VTBL_defelem         &PL_vtbl_defelem
 #  define VTBL_regexp          &PL_vtbl_regexp
-#  define VTBL_regdata_names   &PL_vtbl_regdata_names
 #  define VTBL_regdata         &PL_vtbl_regdata
 #  define VTBL_regdatum                &PL_vtbl_regdatum
 #  ifdef USE_LOCALE_COLLATE
diff --git a/perl.h b/perl.h
index 3338ea2..4fb64ed 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -4832,18 +4832,6 @@ MGVTBL_SET(
 );
 
 MGVTBL_SET(
-    PL_vtbl_regdata_names,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL
-);
-
-MGVTBL_SET(
     PL_vtbl_regdata,
     NULL,
     NULL,
diff --git a/sv.c b/sv.c
index 4fa4498..5fe95c2 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -4532,9 +4532,6 @@ Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 nam
     case PERL_MAGIC_regdata:
        vtable = &PL_vtbl_regdata;
        break;
-    case PERL_MAGIC_regdata_names:
-       vtable = &PL_vtbl_regdata_names;
-       break;
     case PERL_MAGIC_regdatum:
        vtable = &PL_vtbl_regdatum;
        break;
@@ -4597,6 +4594,7 @@ Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 nam
     case PERL_MAGIC_vec:
        vtable = &PL_vtbl_vec;
        break;
+    case PERL_MAGIC_regdata_names:
     case PERL_MAGIC_arylen_p:
     case PERL_MAGIC_rhash:
     case PERL_MAGIC_symtab: