|
Dynamic Load Balance 3.6.1+32-59d1
|
#include "support/gtypes.h"

Go to the source code of this file.
Data Structures | |
| struct | GSList |
Typedefs | |
| typedef void(* | GFunc) (gpointer data, gpointer user_data) |
Functions | |
| void | g_slist_free (GSList *list) |
| GSList * | g_slist_prepend (GSList *list, gpointer data) |
| GSList * | g_slist_remove (GSList *list, gconstpointer data) |
| GSList * | g_slist_reverse (GSList *list) |
| guint | g_slist_length (GSList *list) |
| void | g_slist_foreach (GSList *list, GFunc func, gpointer user_data) |
| void g_slist_free | ( | GSList * | list | ) |
g_slist_free: @list: the first link of a #GSList
DLB: free all elements in list
| GSList * g_slist_prepend | ( | GSList * | list, |
| gpointer | data | ||
| ) |
g_slist_prepend: @list: a #GSList @data: the data for the new element
Adds a new element on to the start of the list.
The return value is the new start of the list, which may have changed, so make sure you store the new value.
|[ // Notice that it is initialized to the empty list. GSList *list = NULL; list = g_slist_prepend (list, "last"); list = g_slist_prepend (list, "first"); ]|
Returns: the new start of the #GSList
| GSList * g_slist_remove | ( | GSList * | list, |
| gconstpointer | data | ||
| ) |
g_slist_remove: @list: a #GSList @data: the data of the element to remove
Removes an element from a #GSList. If two elements contain the same data, only the first is removed. If none of the elements contain the data, the #GSList is unchanged.
Returns: the new start of the #GSList
| GSList * g_slist_reverse | ( | GSList * | list | ) |
g_slist_reverse: @list: a #GSList
Reverses a #GSList.
Returns: the start of the reversed #GSList
| guint g_slist_length | ( | GSList * | list | ) |
g_slist_length: @list: a #GSList
Gets the number of elements in a #GSList.
This function iterates over the whole list to count its elements. To check whether the list is non-empty, it is faster to check @list against NULL.
Returns: the number of elements in the #GSList
g_slist_foreach: @list: a #GSList @func: (scope call): the function to call with each element's data @user_data: user data to pass to the function
Calls a function for each element of a #GSList.
It is safe for @func to remove the element from @list, but it must not modify any part of the list after that element.