summaryrefslogtreecommitdiff
path: root/regen/mg_vtable.pl
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-23 14:18:16 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-23 14:45:55 -0800
commit1e6bda93199bc72086fd20f4dab89d46590b379a (patch)
treed3c9063779f46754f059847ce4708cd2dc3dad15 /regen/mg_vtable.pl
parentf0cd42383d11de42b3b8137c27c960b257975418 (diff)
downloadperl-1e6bda93199bc72086fd20f4dab89d46590b379a.tar.gz
[perl #29070] Add vstring set-magic
Some operators, like pp_complement, assign their argument to TARG (which copies vstring magic), modify it in place, and then call set- magic. That’s supposed to work, but vstring magic was remaining as it was, such that ~v7 would still be treated as "v7" by vstring-aware code, even though the resulting string is not "\7". This commit adds vstring set-magic that checks to see whether the pv still matches the vstring. It cannot simply free the vstring magic, as that would prevent $x=v0 from working.
Diffstat (limited to 'regen/mg_vtable.pl')
-rw-r--r--regen/mg_vtable.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/regen/mg_vtable.pl b/regen/mg_vtable.pl
index 799be6b8e5..3c3c4840cb 100644
--- a/regen/mg_vtable.pl
+++ b/regen/mg_vtable.pl
@@ -84,7 +84,7 @@ my %mg =
unknown_to_sv_magic => 1 },
vec => { char => 'v', vtable => 'vec', value_magic => 1,
desc => 'vec() lvalue' },
- vstring => { char => 'V', value_magic => 1,
+ vstring => { char => 'V', value_magic => 1, vtable => 'vstring',
desc => 'SV was vstring literal' },
utf8 => { char => 'w', vtable => 'utf8', value_magic => 1,
desc => 'Cached UTF-8 information' },
@@ -144,6 +144,7 @@ my %sig =
cond => '#ifdef USE_LOCALE_COLLATE'},
'hintselem' => {set => 'sethint', clear => 'clearhint'},
'hints' => {clear => 'clearhints'},
+ 'vstring' => {set => 'setvstring'},
);
my ($vt, $raw, $names) = map {