]> Dogcows Code - chaz/homebank/blobdiff - src/hb-payee.c
Merge branch 'master' into ext-perl
[chaz/homebank] / src / hb-payee.c
index 8852a90c8b4307958520c20b5d9a61c089df25d0..558b76dd526c364a4a4af2b65c81c1757527a9bf 100644 (file)
@@ -1,5 +1,5 @@
 /*  HomeBank -- Free, easy, personal accounting for everyone.
- *  Copyright (C) 1995-2017 Maxime DOYEN
+ *  Copyright (C) 1995-2018 Maxime DOYEN
  *
  *  This file is part of HomeBank.
  *
@@ -20,6 +20,9 @@
 #include "homebank.h"
 #include "hb-payee.h"
 
+#include "ext.h"
+#include "refcount.h"
+
 
 /****************************************************************************/
 /* Debug macros                                                                                 */
@@ -41,12 +44,12 @@ void
 da_pay_free(Payee *item)
 {
        DB( g_print("da_pay_free\n") );
-       if(item != NULL)
+       if(rc_unref(item))
        {
                DB( g_print(" => %d, %s\n", item->key, item->name) );
 
                g_free(item->name);
-               g_free(item);
+               rc_free(item);
        }
 }
 
@@ -55,7 +58,7 @@ Payee *
 da_pay_malloc(void)
 {
        DB( g_print("da_pay_malloc\n") );
-       return g_malloc0(sizeof(Payee));
+       return rc_alloc(sizeof(Payee));
 }
 
 
This page took 0.021316 seconds and 4 git commands to generate.