From 1dbea735b34216dbd8e3f3d807c8d7a53d1852c4 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 3 Jun 2008 11:53:59 +0200 Subject: [PATCH] [list] Remove useless DO_SLIST_UNREF Signed-off-by: Julien Danjou --- common/list.h | 16 ---------------- statusbar.h | 1 - tag.h | 1 - 3 files changed, 18 deletions(-) diff --git a/common/list.h b/common/list.h index f230d070..eb6dfd29 100644 --- a/common/list.h +++ b/common/list.h @@ -179,21 +179,5 @@ return item2; \ } -#define DO_SLIST_UNREF(type, prefix, dtor) \ - static inline void prefix##_list_unref(type **list) \ - { \ - type *next, *item = *list; \ - while(item) \ - { \ - next = item->next; \ - if(--(item->refcount) <= 0) \ - { \ - prefix##_list_detach(list, item); \ - dtor(&item); \ - } \ - item = next; \ - } \ - } - #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/statusbar.h b/statusbar.h index f07f5d76..3c5ef650 100644 --- a/statusbar.h +++ b/statusbar.h @@ -39,7 +39,6 @@ void statusbar_refresh(void); DO_RCNT(statusbar_t, statusbar, statusbar_delete) DO_SLIST(statusbar_t, statusbar, statusbar_delete) -DO_SLIST_UNREF(statusbar_t, statusbar, statusbar_delete) #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/tag.h b/tag.h index 89b0c87a..cde5759d 100644 --- a/tag.h +++ b/tag.h @@ -49,7 +49,6 @@ int luaA_tag_userdata_new(tag_t *); DO_RCNT(tag_t, tag, tag_delete) DO_SLIST(tag_t, tag, tag_delete) -DO_SLIST_UNREF(tag_t, tag, tag_delete) DO_SLIST(tag_client_node_t, tag_client_node, p_delete)