summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorgfx <gfuji@cpan.org>2010-04-25 22:02:09 +0200
committerRafael Garcia-Suarez <rgs@consttype.org>2010-04-25 22:02:09 +0200
commit76f730215a330c9eedad075cf13e470e97f62846 (patch)
treec803d1e6682bedca0691094abce5a70093de46db /universal.c
parent39cf747a86645fde6898cd6d09d351d50755c2fa (diff)
downloadperl-76f730215a330c9eedad075cf13e470e97f62846.tar.gz
Fix utf8::is_utf8 to respect GMAGIC (e.g. $1)
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/universal.c b/universal.c
index ce56d0becd..006baa2fed 100644
--- a/universal.c
+++ b/universal.c
@@ -794,7 +794,8 @@ XS(XS_utf8_is_utf8)
if (items != 1)
croak_xs_usage(cv, "sv");
else {
- const SV * const sv = ST(0);
+ SV * const sv = ST(0);
+ SvGETMAGIC(sv);
if (SvUTF8(sv))
XSRETURN_YES;
else