diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-17 23:53:21 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-17 23:53:21 +0000 |
commit | 121e869fb2aaab8c71b6af27ce8b64742ff5347e (patch) | |
tree | 949f6b10e5cf96d63127d4d3866b39c4f315813a /xsutils.c | |
parent | 4c5e2b0d1b6942d8cf00bbe564b28e490a1b7b83 (diff) | |
download | perl-121e869fb2aaab8c71b6af27ce8b64742ff5347e.tar.gz |
make reftype() consistently croak on non-refs
p4raw-id: //depot/perl@5791
Diffstat (limited to 'xsutils.c')
-rw-r--r-- | xsutils.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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)); |