summaryrefslogtreecommitdiff
path: root/xsutils.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-17 23:53:21 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-17 23:53:21 +0000
commit121e869fb2aaab8c71b6af27ce8b64742ff5347e (patch)
tree949f6b10e5cf96d63127d4d3866b39c4f315813a /xsutils.c
parent4c5e2b0d1b6942d8cf00bbe564b28e490a1b7b83 (diff)
downloadperl-121e869fb2aaab8c71b6af27ce8b64742ff5347e.tar.gz
make reftype() consistently croak on non-refs
p4raw-id: //depot/perl@5791
Diffstat (limited to 'xsutils.c')
-rw-r--r--xsutils.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/xsutils.c b/xsutils.c
index 02fab51203..0f5989b3dd 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));