diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-05-14 09:16:30 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-06-11 10:12:19 +0200 |
commit | b2e9fc6f32369f6de4f37da887e1e7c4a48dd506 (patch) | |
tree | a8aefa2f4b77608f5800a458ee8ab8f14d823f6a /regen | |
parent | c7fdacb978df1723dbbd70b5517ff77db208a23e (diff) | |
download | perl-b2e9fc6f32369f6de4f37da887e1e7c4a48dd506.tar.gz |
PL_vtbl_{bm,fm} can be aliases to PL_vtbl_regexp, instead of copies.
They became copies in 488344d27a84a21a, which merged Perl_magic_setbm() and
Perl_magic_setfm() into Perl_magic_setregexp().
Diffstat (limited to 'regen')
-rw-r--r-- | regen/mg_vtable.pl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/regen/mg_vtable.pl b/regen/mg_vtable.pl index 3419070484..20ba5778bb 100644 --- a/regen/mg_vtable.pl +++ b/regen/mg_vtable.pl @@ -39,11 +39,9 @@ my @sig = 'substr' => {get => 'getsubstr', set => 'setsubstr'}, 'vec' => {get => 'getvec', set => 'setvec'}, 'pos' => {get => 'getpos', set => 'setpos'}, - 'bm' => {set => 'setregexp'}, - 'fm' => {set => 'setregexp'}, 'uvar' => {get => 'getuvar', set => 'setuvar'}, 'defelem' => {get => 'getdefelem', set => 'setdefelem'}, - 'regexp' => {set => 'setregexp'}, + 'regexp' => {set => 'setregexp', alias => [qw(bm fm)]}, 'regdata' => {len => 'regdata_cnt'}, 'regdatum' => {get => 'regdatum_get', set => 'regdatum_set'}, 'amagic' => {set => 'setamagic', free => 'setamagic'}, @@ -96,6 +94,7 @@ EXT_MGVTBL PL_magic_vtables[magic_vtable_max] = { EOH my @vtable_names; +my @aliases; while (my ($name, $data) = splice @sig, 0, 2) { push @vtable_names, $name; @@ -116,6 +115,10 @@ while (my ($name, $data) = splice @sig, 0, 2) { { 0, 0, 0, 0, 0, 0, 0, 0 }$comma #endif EOH + foreach(@{$data->{alias}}) { + push @aliases, "#define want_vtbl_$_ want_vtbl_$name\n"; + push @vtable_names, $_; + } } print $h <<'EOH'; @@ -126,6 +129,7 @@ EXT_MGVTBL PL_magic_vtables[magic_vtable_max]; EOH +print $h @aliases, "\n";; print $h "#define PL_vtbl_$_ PL_magic_vtables[want_vtbl_$_]\n" foreach sort @vtable_names; |