X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Nary.git;a=blobdiff_plain;f=Nary.xs;fp=Nary.xs;h=bcdde48999c3c4fc881ee43c181495fe4ca9d3c7;hp=95fca936f633ac054718d4f3ab0d9582bddcdb15;hb=972e76e13b6f6e85c20493bddba2d1fd71fd57f8;hpb=429a59ef0920be32c4263b67fc0a32b542ae34be diff --git a/Nary.xs b/Nary.xs index 95fca93..bcdde48 100644 --- a/Nary.xs +++ b/Nary.xs @@ -171,17 +171,11 @@ CODE: if (!SvOK(cur)) continue; if (!SvROK(cur)) { - if (strEQ(SvPV_nolen(cur), "list")) { - hv_clear(res); - sn_store(res, "list", 4, newSVuv(1), sn_hash_list); - break; - } else { - NV v = 1; - if ((old = hv_fetch_ent(res, cur, 1, 0)) && SvOK(val = HeVAL(old))) - v += SvNV(val); - sn_store_ent(res, cur, newSVnv(v), 0); - continue; - } + NV v = 1; + if ((old = hv_fetch_ent(res, cur, 1, 0)) && SvOK(val = HeVAL(old))) + v += SvNV(val); + sn_store_ent(res, cur, newSVnv(v), 0); + continue; } cur = SvRV(cur); hv_iterinit((HV *) cur);