X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=object.c;h=63e6e784d41ef5aa7bb387a96a85bf0f8e7248ab;hb=7f88c8463caa14ca397048f8e576e348ce73203a;hp=72f6aa552f79edcd5f4f5c4a647ab62503365b1b;hpb=3f81fc82743ccd4fd7157f1f1db41605eb018fb9;p=git.git diff --git a/object.c b/object.c index 72f6aa55..63e6e784 100644 --- a/object.c +++ b/object.c @@ -184,6 +184,17 @@ struct object_list *object_list_insert(struct object *item, return new_list; } +void object_list_append(struct object *item, + struct object_list **list_p) +{ + while (*list_p) { + list_p = &((*list_p)->next); + } + *list_p = xmalloc(sizeof(struct object_list)); + (*list_p)->next = NULL; + (*list_p)->item = item; +} + unsigned object_list_length(struct object_list *list) { unsigned ret = 0;