From: Vincent Pit Date: Sat, 23 Apr 2011 14:23:32 +0000 (+0200) Subject: Return canonical truth values from veq() X-Git-Tag: v0.07~19 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=337333a16f28eef9eb60bc974e85bf0eddb0279b;p=perl%2Fmodules%2FScalar-Vec-Util.git Return canonical truth values from veq() --- diff --git a/Util.xs b/Util.xs index 2c3cc6e..72b2830 100644 --- a/Util.xs +++ b/Util.xs @@ -128,7 +128,7 @@ CODE: XSRETURN(0); -SV * +void veq(SV *sv1, SV *ss1, SV *sv2, SV *ss2, SV *sl) PROTOTYPE: $$$$$ PREINIT: @@ -138,7 +138,7 @@ PREINIT: CODE: l = svu_validate_uv(sl, "length"); if (!l) - XSRETURN_YES; + goto done; s1 = svu_validate_uv(ss1, "offset"); s2 = svu_validate_uv(ss2, "offset"); @@ -182,6 +182,5 @@ CODE: } done: - RETVAL = newSVuv(res); -OUTPUT: - RETVAL + ST(0) = res ? &PL_sv_yes : &PL_sv_no; + XSRETURN(1);