Difference between pages "r6:Function:slist get head and then next" and "r6:Function:slist get next"
(Difference between pages)
Jump to navigation
Jump to search
m (1 revision imported) |
m (1 revision imported) |
||
Line 4: | Line 4: | ||
==Prototype== | ==Prototype== | ||
struct slist_element * | struct slist_element *slist_get_next( struct slist_element *se, struct slist_element **next_se ); | ||
==Parameters== | ==Parameters== | ||
''struct | ''struct slist_element *se'' | ||
: | : A pointer to an slist element, as obtained from ''[[r6:Function:slist_new_head|slist_new_head]]'', ''[[r6:Function:slist_new_next|slist_new_next]]'', ''[[r6:Function:slist_get_head|slist_get_head]]'', ''slist_get_next'' or ''[[r6:Function:slist_get_head_and_then_next|slist_get_head_and_then_next]]''. | ||
''struct slist_element ** | ''struct slist_element **next_se'' | ||
: A pointer to a pointer which | : A pointer to a pointer into which a pointer to the next slist element will be placed. Set to NULL if there is no next element. | ||
==Return Value== | ==Return Value== | ||
Returns a pointer to the next element. Returns NULL if there is no next element. | |||
==Notes== | ==Notes== | ||
It is acceptable (and expected to often occur) to use the same variable for both arguments, e.g. | |||
slist_get_next( se, &se ); | |||
==See Also== | ==See Also== | ||
* [[r6:API:SList|SList]] | * [[r6:API:SList|SList]] | ||
* [[r6:Function:slist_get_head|slist_get_head]] | * [[r6:Function:slist_get_head|slist_get_head]] | ||
* [[r6:Function: | * [[r6:Function:slist_get_head_and_then_next|slist_get_head_and_then_next]] |
Latest revision as of 14:07, 4 January 2015
Source Files
/src/slist/slist_get_and_set.c /inc/liblfds.h
Prototype
struct slist_element *slist_get_next( struct slist_element *se, struct slist_element **next_se );
Parameters
struct slist_element *se
- A pointer to an slist element, as obtained from slist_new_head, slist_new_next, slist_get_head, slist_get_next or slist_get_head_and_then_next.
struct slist_element **next_se
- A pointer to a pointer into which a pointer to the next slist element will be placed. Set to NULL if there is no next element.
Return Value
Returns a pointer to the next element. Returns NULL if there is no next element.
Notes
It is acceptable (and expected to often occur) to use the same variable for both arguments, e.g.
slist_get_next( se, &se );