From: Gurusamy Sarathy Date: Fri, 17 Mar 2000 23:53:21 +0000 (+0000) Subject: make reftype() consistently croak on non-refs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=121e869fb2aaab8c71b6af27ce8b64742ff5347e;p=p5sagit%2Fp5-mst-13.2.git make reftype() consistently croak on non-refs p4raw-id: //depot/perl@5791 --- diff --git a/xsutils.c b/xsutils.c index 02fab51..0f5989b 100644 --- a/xsutils.c +++ b/xsutils.c @@ -253,11 +253,7 @@ usage: rv = ST(0); ST(0) = TARG; - if (!SvOK(rv)) { - ST(0) = &PL_sv_no; - XSRETURN(1); - } - if (!SvROK(rv)) + if (!(SvOK(rv) && SvROK(rv))) goto usage; sv = SvRV(rv); sv_setpv(TARG, sv_reftype(sv, 0));