diff options
author | Bo Yang <struggleyb.nku@gmail.com> | 2009-08-11 11:17:23 +0000 |
---|---|---|
committer | Bo Yang <struggleyb.nku@gmail.com> | 2009-08-11 11:17:23 +0000 |
commit | 399da01ae4eb5c5e3e9349bacc2063c946c3d4a1 (patch) | |
tree | 433c8bcde94fc7a6e6f2e5cbf23842a84db98146 /src/core/impllist.c | |
parent | eec057c7437e19b59ca1e698ce548cb56ce37240 (diff) | |
download | libdom-399da01ae4eb5c5e3e9349bacc2063c946c3d4a1.tar.gz libdom-399da01ae4eb5c5e3e9349bacc2063c946c3d4a1.tar.bz2 |
Merge the branches/struggleyb/libdom-remain back to trunk.
svn path=/trunk/dom/; revision=9191
Diffstat (limited to 'src/core/impllist.c')
-rw-r--r-- | src/core/impllist.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/core/impllist.c b/src/core/impllist.c index 522c3f7..2f25926 100644 --- a/src/core/impllist.c +++ b/src/core/impllist.c @@ -9,6 +9,9 @@ #include <dom/core/implementation.h> #include <dom/core/impllist.h> +extern void dom_implementation_list_destroy( + struct dom_implementation_list *list); + /** * Claim a reference on a DOM implementation list * @@ -29,22 +32,8 @@ void dom_implementation_list_ref(struct dom_implementation_list *list) */ void dom_implementation_list_unref(struct dom_implementation_list *list) { - struct dom_implementation_list_item *i, *j; - if (--list->refcnt == 0) { - /* Destroy all list entries */ - for (i = list->head; i; i = j) { - j = i->next; - - /* Unreference the implementation */ - dom_implementation_unref(i->impl); - - /* And free the entry */ - list->alloc(i, 0, list->pw); - } - - /* Free the list object */ - list->alloc(list, 0, list->pw); + dom_implementation_list_destroy(list); } } |