Difference between pages "r6:Function:slist get next" and "r6:Function:slist get user data from element"
(Difference between pages)
Jump to navigation
Jump to search
m (1 revision imported) |
m (1 revision imported) |
||
Line 4: | Line 4: | ||
==Prototype== | ==Prototype== | ||
int slist_get_user_data_from_element( struct slist_element *se, void **user_data ); | |||
==Parameters== | ==Parameters== | ||
''struct slist_element *se'' | ''struct slist_element *se'' | ||
: A pointer to an slist element | : A pointer to an slist element as allocated by ''[[r6:Function:slist_new_head|slist_new_head]]'' or ''[[r6:Function:slist_new_next|slist_new_next]]''. | ||
'' | ''void **user_data'' | ||
: A pointer to a pointer into which | : A pointer to a pointer into which the user data will be placed. | ||
==Return Value== | ==Return Value== | ||
Returns | Returns 1 on success, 0 on failure. The only cause of failure is if you try to get the user data from an element which has been logically deleted. | ||
==Notes== | ==Notes== | ||
This function gets the user data void pointer in the slist element. | |||
==See Also== | ==See Also== | ||
* [[r6:API:SList|SList]] | * [[r6:API:SList|SList]] | ||
* [[r6:Function: | * [[r6:Function:slist_set_user_data_in_element|slist_set_user_data_in_element]] | ||
Latest revision as of 14:07, 4 January 2015
Source Files
/src/slist/slist_get_and_set.c /inc/liblfds.h
Prototype
int slist_get_user_data_from_element( struct slist_element *se, void **user_data );
Parameters
struct slist_element *se
- A pointer to an slist element as allocated by slist_new_head or slist_new_next.
void **user_data
- A pointer to a pointer into which the user data will be placed.
Return Value
Returns 1 on success, 0 on failure. The only cause of failure is if you try to get the user data from an element which has been logically deleted.
Notes
This function gets the user data void pointer in the slist element.