r6.1.1:lfds611_stack_pop

From liblfds.org
Revision as of 14:07, 4 January 2015 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source Files

/liblfds611/src/lfds611_stack/lfds611_stack_push_pop.c
/liblfds611/inc/liblfds611.h

Prototype

int lfds611_stack_pop( struct lfds611_stack_state *ss, void **user_data );

Parameters

struct lfds611_stack_state *ss

A stack state as allocated by lfds611_stack_new.

void **user_data

The address of a pointer into which the user data will be placed. If the stack is empty, *user_data is not modified, as NULL is a valid user data value.

Return Value

The return value is 1 upon successful pop, 0 upon unsuccessful pop. Popping fails only if the stack is empty. Note that on an unsuccessful pop, *user_data is untouched; it is not set to NULL, since NULL is a valid user data value. Only the return value indicates whether or not the pop was successful.

Notes

No notes.

See Also