]> git.vpit.fr Git - perl/modules/Sub-Nary.git/commitdiff
With cheating a bit, we get 100% XS code coverage
authorVincent Pit <vince@profvince.com>
Wed, 20 Aug 2008 13:10:10 +0000 (15:10 +0200)
committerVincent Pit <vince@profvince.com>
Wed, 20 Aug 2008 13:10:10 +0000 (15:10 +0200)
Nary.xs

diff --git a/Nary.xs b/Nary.xs
index 7a78e938aaf92804a91840b40ca81b438617424c..285bfc39973766318639023337c2f0916e90fb0f 100644 (file)
--- 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);
 }