summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2011-07-23 17:03:18 -0300
committerFather Chrysostomos <sprout@cpan.org>2011-10-06 13:01:03 -0700
commit728847b1f4544844ac4823ce752d86aa297156d2 (patch)
tree34d9a799f603c9c355b046b856a69608f33da434 /toke.c
parent6b10071b89fa167ee9dcd4aec827be0aa3200694 (diff)
downloadperl-728847b1f4544844ac4823ce752d86aa297156d2.tar.gz
toke.c: S_force_ident, GV-related UTF8 cleanup
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/toke.c b/toke.c
index cdde065057..d7ca8e4f00 100644
--- a/toke.c
+++ b/toke.c
@@ -2093,7 +2093,8 @@ S_force_ident(pTHX_ register const char *s, int kind)
if (*s) {
const STRLEN len = strlen(s);
- OP* const o = (OP*)newSVOP(OP_CONST, 0, newSVpvn(s, len));
+ OP* const o = (OP*)newSVOP(OP_CONST, 0, newSVpvn_flags(s, len,
+ UTF ? SVf_UTF8 : 0));
start_force(PL_curforce);
NEXTVAL_NEXTTOKE.opval = o;
force_next(WORD);
@@ -2103,8 +2104,8 @@ S_force_ident(pTHX_ register const char *s, int kind)
warnings if the symbol must be introduced in an eval.
GSAR 96-10-12 */
gv_fetchpvn_flags(s, len,
- PL_in_eval ? (GV_ADDMULTI | GV_ADDINEVAL)
- : GV_ADD,
+ (PL_in_eval ? (GV_ADDMULTI | GV_ADDINEVAL)
+ : GV_ADD) | ( UTF ? SVf_UTF8 : 0 ),
kind == '$' ? SVt_PV :
kind == '@' ? SVt_PVAV :
kind == '%' ? SVt_PVHV :