summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2011-09-30 06:25:45 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-10-06 13:01:19 -0700
commitdab1c735364fcc41f4fbd1c15b5e26e8a7b07cab (patch)
treea4681e32c95dbd9711ee77cbcbf3d0727dd84eee /sv.c
parente0260a5b7a4c9245402af2910213dd35717e5bd2 (diff)
downloadperl-dab1c735364fcc41f4fbd1c15b5e26e8a7b07cab.tar.gz
toke.c, op.c, sv.c: Prototype parsing and checking are nul-and-UTF8 clean.
This means that eval "sub foo ($;\0whoops) { say @_ }" will correctly include \0whoops in the CV's prototype (while complaining about illegal characters), and that use utf8; BEGIN { $::{"foo"} = "\$\0L\351on" } BEGIN { eval "sub foo (\$\0L\x{c3}\x{a9}on) {};"; } will not warn about a mismatched prototype.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 742518ac67..e6323b9135 100644
--- a/sv.c
+++ b/sv.c
@@ -3853,9 +3853,10 @@ S_glob_assign_ref(pTHX_ SV *const dstr, SV *const sstr)
}
}
if (!intro)
- cv_ckproto_len(cv, (const GV *)dstr,
+ cv_ckproto_len_flags(cv, (const GV *)dstr,
SvPOK(sref) ? SvPVX_const(sref) : NULL,
- SvPOK(sref) ? SvCUR(sref) : 0);
+ SvPOK(sref) ? SvCUR(sref) : 0,
+ SvPOK(sref) ? SvUTF8(sref) : 0);
}
GvCVGEN(dstr) = 0; /* Switch off cacheness. */
GvASSUMECV_on(dstr);