/* HomeBank -- Free, easy, personal accounting for everyone.
- * Copyright (C) 1995-2014 Maxime DOYEN
+ * Copyright (C) 1995-2016 Maxime DOYEN
*
* This file is part of HomeBank.
*
#include "homebank.h"
#include "hb-tag.h"
+#include "ext.h"
+#include "refcount.h"
+
#define MYDEBUG 0
#if MYDEBUG
void da_tag_free(Tag *item)
{
DB( g_print("da_tag_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);
}
}
Tag *da_tag_malloc(void)
{
DB( g_print("da_tag_malloc\n") );
- return g_malloc0(sizeof(Tag));
+ return rc_alloc(sizeof(Tag));
}
/**
* da_tag_remove:
*
- * remove an tag from the GHashTable
+ * delete an tag from the GHashTable
*
- * Return value: TRUE if the key was found and removed
+ * Return value: TRUE if the key was found and deleted
*
*/
gboolean da_tag_remove(guint32 key)