From 1e6bda93199bc72086fd20f4dab89d46590b379a Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 23 Dec 2011 14:18:16 -0800 Subject: [perl #29070] Add vstring set-magic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- mg_raw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mg_raw.h') diff --git a/mg_raw.h b/mg_raw.h index 7a45e6de0f..f4e174247b 100644 --- a/mg_raw.h +++ b/mg_raw.h @@ -74,7 +74,7 @@ "/* taint 't' Taintedness */" }, { 'U', "want_vtbl_uvar", "/* uvar 'U' Available for use by extensions */" }, - { 'V', "magic_vtable_max | PERL_MAGIC_VALUE_MAGIC", + { 'V', "want_vtbl_vstring | PERL_MAGIC_VALUE_MAGIC", "/* vstring 'V' SV was vstring literal */" }, { 'v', "want_vtbl_vec | PERL_MAGIC_VALUE_MAGIC", "/* vec 'v' vec() lvalue */" }, -- cgit v1.2.1