From: Gurusamy Sarathy Date: Thu, 9 Mar 2000 18:48:05 +0000 (+0000) Subject: UNIVERSAL::isa() and UNIVERSAL::can() fail for magic values X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3f7f2b292e54c14f8b24c9e784edc6ace9d7abf;p=p5sagit%2Fp5-mst-13.2.git UNIVERSAL::isa() and UNIVERSAL::can() fail for magic values p4raw-id: //depot/perl@5630 --- diff --git a/universal.c b/universal.c index f6b25a4..28e0896 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;