diff --git a/include/refcount_internal.h b/include/refcount_internal.h deleted file mode 100644 index cd9a371..0000000 --- a/include/refcount_internal.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef LIBABACUS_REFCOUNT_INTERNAL_H -#define LIBABACUS_REFCOUNT_INTERNAL_H - -#include "refcount.h" - -void libab_ref_count_changed(libab_ref_count* count); - -#endif diff --git a/src/gc.c b/src/gc.c index da7d3d9..3572885 100644 --- a/src/gc.c +++ b/src/gc.c @@ -3,7 +3,6 @@ #include #include #include -#include "refcount_internal.h" void libab_gc_list_init(libab_gc_list* list) { memset(&list->head_sentinel, 0, sizeof(list->head_sentinel)); diff --git a/src/refcount_internal.c b/src/refcount_internal.c deleted file mode 100644 index 97d383d..0000000 --- a/src/refcount_internal.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "refcount_internal.h" -#include - -void libab_ref_count_changed(libab_ref_count* count) { - if (count->strong == 0) { - count->strong--; - if (count->free_func) { - count->free_func(count->data); - } - } - if (count->weak == 0) { - if(count->prev) count->prev->next = count->next; - if(count->next) count->next->prev = count->prev; - free(count); - } -}