summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-09 18:48:05 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-09 18:48:05 +0000
commitd3f7f2b292e54c14f8b24c9e784edc6ace9d7abf (patch)
treef707a753f96c85b3b03fae4e86afd2db61953f6e /universal.c
parent21bad92165270edd85ff697c883b65506d5af626 (diff)
downloadperl-d3f7f2b292e54c14f8b24c9e784edc6ace9d7abf.tar.gz
UNIVERSAL::isa() and UNIVERSAL::can() fail for magic values
p4raw-id: //depot/perl@5630
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/universal.c b/universal.c
index f6b25a4d33..28e08969b4 100644
--- a/universal.c
+++ b/universal.c
@@ -139,6 +139,9 @@ XS(XS_UNIVERSAL_isa)
sv = ST(0);
+ if (SvGMAGICAL(sv))
+ mg_get(sv);
+
if (!SvOK(sv) || !(SvROK(sv) || SvCUR(sv)))
XSRETURN_UNDEF;
@@ -162,6 +165,9 @@ XS(XS_UNIVERSAL_can)
sv = ST(0);
+ if (SvGMAGICAL(sv))
+ mg_get(sv);
+
if (!SvOK(sv) || !(SvROK(sv) || SvCUR(sv)))
XSRETURN_UNDEF;