This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Continue #7041.
[perl5.git]
/
xsutils.c
diff --git
a/xsutils.c
b/xsutils.c
index
02fab51
..
b4161b0
100644
(file)
--- a/
xsutils.c
+++ b/
xsutils.c
@@
-253,11
+253,9
@@
usage:
rv = ST(0);
ST(0) = TARG;
- if (!SvOK(rv)) {
- ST(0) = &PL_sv_no;
- XSRETURN(1);
- }
- if (!SvROK(rv))
+ if (SvGMAGICAL(rv))
+ mg_get(rv);
+ if (!(SvOK(rv) && SvROK(rv)))
goto usage;
sv = SvRV(rv);
sv_setpv(TARG, sv_reftype(sv, 0));