c-libp2p/include/libp2p/utils/linked_list.h
2017-02-20 18:53:20 -05:00

21 lines
525 B
C

#pragma once
struct Libp2pLinkedList {
void* item;
void* next;
};
/***
* Create a new linked list struct
* @returns a new linked list struct
*/
struct Libp2pLinkedList* libp2p_utils_linked_list_new();
/**
* Free resources from a linked list
* NOTE: if the item is a complex object, free the item before
* you call this method, and set item to NULL. Otherwise, this
* method will call a simple free()
* @param head the top of the linked list
*/
void libp2p_utils_linked_list_free(struct Libp2pLinkedList* head);