X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Nary.xs;h=cd55073d179a4fa7706fd87f1f018e9e12955c63;hb=d54adefcf868ef04be54635a0ea4ab82167104ba;hp=285bfc39973766318639023337c2f0916e90fb0f;hpb=a33b469f64e34357d8522878f9c6920bdd4c8128;p=perl%2Fmodules%2FSub-Nary.git diff --git a/Nary.xs b/Nary.xs index 285bfc3..cd55073 100644 --- a/Nary.xs +++ b/Nary.xs @@ -140,7 +140,7 @@ CODE: } else { hv = (HV *) SvRV(sv); if (!hv_iterinit(hv)) { - sn_store(res, "0", 1, newSVnv(c), 0); + XSRETURN_UNDEF; } else { hv_iterinit(hv); while (key = hv_iternext(hv)) { @@ -258,7 +258,7 @@ CODE: res[0] = res[1] = NULL; for (i = 0; i < items; ++i) { cur = ST(i); - if (!SvOK(cur)) + if (!SvOK(cur)) continue; if (!SvROK(cur)) { if (strEQ(SvPV_nolen(cur), "list")) { @@ -372,7 +372,7 @@ CODE: XSRETURN_UNDEF; if (n == 1) SvREFCNT_dec(res[0]); - else if (res[1]) + else if (res[1]) SvREFCNT_dec(res[1]); ST(0) = sv_2mortal(newRV_noinc((SV *) res[n])); XSRETURN(1);