80#if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION)
81# error "Header files shouldn't be included directly, consider using <plibsys.h> instead."
84#ifndef PLIBSYS_HEADER_PLIST_H
85#define PLIBSYS_HEADER_PLIST_H
P_LIB_API void p_list_foreach(PList *list, PFunc func, ppointer user_data)
Calls a specified function for each list node.
P_LIB_API psize p_list_length(const PList *list)
Gets the number of list nodes.
P_LIB_API PList * p_list_last(PList *list)
Gets the last node from the list.
P_LIB_API PList * p_list_reverse(PList *list) P_GNUC_WARN_UNUSED_RESULT
Reverses the list order.
P_LIB_API PList * p_list_prepend(PList *list, ppointer data) P_GNUC_WARN_UNUSED_RESULT
Prepends data to a list.
P_LIB_API void p_list_free(PList *list)
Frees list memory.
P_LIB_API PList * p_list_remove(PList *list, pconstpointer data) P_GNUC_WARN_UNUSED_RESULT
Removes data from a list.
P_LIB_API PList * p_list_append(PList *list, ppointer data) P_GNUC_WARN_UNUSED_RESULT
Appends data to a list.
#define P_GNUC_WARN_UNUSED_RESULT
Gives a warning if the result returned from a function is not being used.
#define P_BEGIN_DECLS
Starts .h file declarations to be exported as C functions.
#define P_END_DECLS
Closes .h file declarations to be exported as C functions, should be always used after P_BEGIN_DECLS.
#define P_LIB_API
Exports a symbol from a shared library.
void(* PFunc)(ppointer data, ppointer user_data)
General purpose function.
unsigned int psize
Type for a platform independent size_t.
const void * pconstpointer
Type for a const pointer.
void * ppointer
Type for a pointer.
Node for a singly linked list.
PList * next
Next list node.
ppointer data
Pointer to the node data.