Simple C Expat Wrapper (SCEW)  1.1.7
Files | Functions
Allocation

Allocate and free new lists. More...

Files

file  list.h
 SCEW general list implementation.
 

Functions

SCEW_API scew_listscew_list_create (void *data)
 Creates a new list item with the given data. More...
 
SCEW_API void scew_list_free (scew_list *list)
 Frees all the items from the given list. More...
 

Detailed Description

Allocate and free new lists.

Function Documentation

SCEW_API scew_list* scew_list_create ( void *  data)

Creates a new list item with the given data.

Note that there is no difference between list items and lists, that is, a list item is a list itself.

Precondition
data != NULL
Returns
a new list, or NULL if the list could not be created.
SCEW_API void scew_list_free ( scew_list list)

Frees all the items from the given list.

The data pointers are not freed, thus they need to be freed separately.