summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-14 09:41:18 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-11 10:39:31 +0200
commitb76b0bf9b926e6a5504a59a935a232eb91d44437 (patch)
tree455cc52b96e804f581ded5f59fdc5d5d3fadf4cb
parentb2e9fc6f32369f6de4f37da887e1e7c4a48dd506 (diff)
downloadperl-b76b0bf9b926e6a5504a59a935a232eb91d44437.tar.gz
Replace references to PL_vtbl_{bm,fm} in the code with PL_vtbl_regexp.
Also, in Perl_sv_magic() merge the case for PERL_MAGIC_dbfile with the others that return a NULL vtable.
-rw-r--r--dump.c2
-rw-r--r--ext/Devel-Peek/t/Peek.t4
-rw-r--r--regen/mg_vtable.pl2
-rw-r--r--sv.c12
4 files changed, 6 insertions, 14 deletions
diff --git a/dump.c b/dump.c
index 66b6da5fbd..97505fb7c4 100644
--- a/dump.c
+++ b/dump.c
@@ -1308,8 +1308,6 @@ Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, const MAGIC *mg, I32 nest, I32
else if (v == &PL_vtbl_substr) s = "substr";
else if (v == &PL_vtbl_vec) s = "vec";
else if (v == &PL_vtbl_pos) s = "pos";
- else if (v == &PL_vtbl_bm) s = "bm";
- else if (v == &PL_vtbl_fm) s = "fm";
else if (v == &PL_vtbl_uvar) s = "uvar";
else if (v == &PL_vtbl_defelem) s = "defelem";
#ifdef USE_LOCALE_COLLATE
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t
index 7c6e985c2d..46be49c061 100644
--- a/ext/Devel-Peek/t/Peek.t
+++ b/ext/Devel-Peek/t/Peek.t
@@ -814,7 +814,7 @@ unless ($Config{useithreads}) {
CUR = 5
LEN = \d+
MAGIC = $ADDR
- MG_VIRTUAL = &PL_vtbl_bm
+ MG_VIRTUAL = &PL_vtbl_regexp
MG_TYPE = PERL_MAGIC_bm\\(B\\)
MG_LEN = 256
MG_PTR = $ADDR "(?:\\\\\d){256}"
@@ -833,7 +833,7 @@ unless ($Config{useithreads}) {
CUR = 5
LEN = \d+
MAGIC = $ADDR
- MG_VIRTUAL = &PL_vtbl_bm
+ MG_VIRTUAL = &PL_vtbl_regexp
MG_TYPE = PERL_MAGIC_bm\\(B\\)
MG_LEN = 256
MG_PTR = $ADDR "(?:\\\\\d){256}"
diff --git a/regen/mg_vtable.pl b/regen/mg_vtable.pl
index 20ba5778bb..0e78029571 100644
--- a/regen/mg_vtable.pl
+++ b/regen/mg_vtable.pl
@@ -129,7 +129,7 @@ EXT_MGVTBL PL_magic_vtables[magic_vtable_max];
EOH
-print $h @aliases, "\n";;
+print $h (sort @aliases), "\n";
print $h "#define PL_vtbl_$_ PL_magic_vtables[want_vtbl_$_]\n"
foreach sort @vtable_names;
diff --git a/sv.c b/sv.c
index 4b63ac8c8f..b76e0761f7 100644
--- a/sv.c
+++ b/sv.c
@@ -5292,9 +5292,6 @@ Perl_sv_magic(pTHX_ register SV *const sv, SV *const obj, const int how,
case PERL_MAGIC_overload_table:
vtable = &PL_vtbl_ovrld;
break;
- case PERL_MAGIC_bm:
- vtable = &PL_vtbl_bm;
- break;
case PERL_MAGIC_regdata:
vtable = &PL_vtbl_regdata;
break;
@@ -5304,9 +5301,6 @@ Perl_sv_magic(pTHX_ register SV *const sv, SV *const obj, const int how,
case PERL_MAGIC_env:
vtable = &PL_vtbl_env;
break;
- case PERL_MAGIC_fm:
- vtable = &PL_vtbl_fm;
- break;
case PERL_MAGIC_envelem:
vtable = &PL_vtbl_envelem;
break;
@@ -5322,9 +5316,6 @@ Perl_sv_magic(pTHX_ register SV *const sv, SV *const obj, const int how,
case PERL_MAGIC_nkeys:
vtable = &PL_vtbl_nkeys;
break;
- case PERL_MAGIC_dbfile:
- vtable = NULL;
- break;
case PERL_MAGIC_dbline:
vtable = &PL_vtbl_dbline;
break;
@@ -5340,6 +5331,8 @@ Perl_sv_magic(pTHX_ register SV *const sv, SV *const obj, const int how,
case PERL_MAGIC_tiedscalar:
vtable = &PL_vtbl_packelem;
break;
+ case PERL_MAGIC_fm:
+ case PERL_MAGIC_bm:
case PERL_MAGIC_qr:
vtable = &PL_vtbl_regexp;
break;
@@ -5357,6 +5350,7 @@ Perl_sv_magic(pTHX_ register SV *const sv, SV *const obj, const int how,
case PERL_MAGIC_vec:
vtable = &PL_vtbl_vec;
break;
+ case PERL_MAGIC_dbfile:
case PERL_MAGIC_sig:
case PERL_MAGIC_arylen_p:
case PERL_MAGIC_rhash: