summaryrefslogtreecommitdiff
path: root/ext/B
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2013-10-23 15:12:18 +0100
committerDavid Mitchell <davem@iabyn.com>2013-10-23 15:15:32 +0100
commitfea7fb25afff9547ae810fad732c75518bb156a3 (patch)
treea825a42012b34b3b69cb902b9571a67f9ff5da0b /ext/B
parentdf8dcb28d0eee23f10e6af3590aaafec84870183 (diff)
downloadperl-fea7fb25afff9547ae810fad732c75518bb156a3.tar.gz
Make B/Deparse handle unicode regexes
[perl #120182] the precomp B::OP method was returning a non-UTF8 string even if the regex was utf8
Diffstat (limited to 'ext/B')
-rw-r--r--ext/B/B.pm2
-rw-r--r--ext/B/B.xs2
2 files changed, 3 insertions, 1 deletions
diff --git a/ext/B/B.pm b/ext/B/B.pm
index 4d0df907c7..7a63f629b7 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -15,7 +15,7 @@ require Exporter;
# walkoptree comes from B.xs
BEGIN {
- $B::VERSION = '1.46';
+ $B::VERSION = '1.47';
@B::EXPORT_OK = ();
# Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
diff --git a/ext/B/B.xs b/ext/B/B.xs
index 7866aec94d..18857cbd31 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -1143,6 +1143,8 @@ next(o)
}
else {
sv_setpvn(ret, RX_PRECOMP(rx), RX_PRELEN(rx));
+ if (RX_UTF8(rx))
+ SvUTF8_on(ret);
}
}
}