G-Golf Glib Doubly-Linked Lists low level API.
Doubly-Linked Lists — linked lists that can be iterated over in both
directions
The GList
structure and its associated functions provide a
standard doubly-linked list data structure.
Each element in the list contains a piece of data, together with
pointers which link to the previous and next elements in the list. Using
these pointers it is possible to move through the list in both
directions (unlike the singly-linked GSList
, which only allows
movement through the list in the forward direction).
Please read the Doubly-Linked-Lists section from the Glib reference manual for a complete description.
Returns a pointer.
Obtains and returns a pointer to the data in g-list, or any integer value, in which case, it is the responsibility of the caller to apply the appropriate type conversion procedure.
Returns a pointer or #f.
Obtains and returns the next element in g-list, or #f if there are no more elements.
Returns a pointer or #f.
Obtains and returns the previous element in g-list, or #f if there are no previous element.
Returns nothing.
Frees all of the memory used by g-list.
Returns an integer.
Obtains and returns the number of elements in g-list. This function iterates over the whole list to count its elements.
Returns a pointer or #f.
Obtains and returns a pointer to the data of the n-th element of g-list. This iterates over the list until it reaches the n-th position. If n is off the end of g-list, it returns #f.