From: Vincent Pit Date: Wed, 20 Aug 2008 13:10:10 +0000 (+0200) Subject: With cheating a bit, we get 100% XS code coverage X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=a33b469f64e34357d8522878f9c6920bdd4c8128;p=perl%2Fmodules%2FSub-Nary.git With cheating a bit, we get 100% XS code coverage --- diff --git a/Nary.xs b/Nary.xs index 7a78e93..285bfc3 100644 --- a/Nary.xs +++ b/Nary.xs @@ -17,14 +17,12 @@ typedef struct { STATIC void sn_store(pTHX_ HV *tb, const char *key, I32 klen, SV *val, U32 hash) { #define sn_store(T, K, KL, V, H) sn_store(aTHX_ (T), (K), (KL), (V), (H)) - if (!hv_store(tb, key, klen, val, hash)) - SvREFCNT_dec(val); + if (!hv_store(tb, key, klen, val, hash)) SvREFCNT_dec(val); } STATIC void sn_store_ent(pTHX_ HV *tb, SV *key, SV *val, U32 hash) { #define sn_store_ent(T, K, V, H) sn_store_ent(aTHX_ (T), (K), (V), (H)) - if (!hv_store_ent(tb, key, val, hash)) - SvREFCNT_dec(val); + if (!hv_store_ent(tb, key, val, hash)) SvREFCNT_dec(val); }