diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-03-01 18:11:40 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-03-01 18:11:40 +0100 |
commit | c987fd8c53b4ebabd8ca3d9b32216ac7f7ba6a9e (patch) | |
tree | d1099949b005c796546a8176847dc1b8fbb1a6f7 /include/libssh/misc.h | |
parent | d083554dff7101a01a636e140367c64a254f0972 (diff) | |
download | libssh-c987fd8c53b4ebabd8ca3d9b32216ac7f7ba6a9e.tar.gz libssh-c987fd8c53b4ebabd8ca3d9b32216ac7f7ba6a9e.tar.xz libssh-c987fd8c53b4ebabd8ca3d9b32216ac7f7ba6a9e.zip |
renamed ssh_list_get_head to ssh_list_pop_head
Diffstat (limited to 'include/libssh/misc.h')
-rw-r--r-- | include/libssh/misc.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/include/libssh/misc.h b/include/libssh/misc.h index 21104c78..3c33d0e1 100644 --- a/include/libssh/misc.h +++ b/include/libssh/misc.h @@ -49,11 +49,7 @@ struct ssh_iterator *ssh_list_get_iterator(const struct ssh_list *list); int ssh_list_add(struct ssh_list *list, const void *data); void ssh_list_remove(struct ssh_list *list, struct ssh_iterator *iterator); -/** @brief fetch the head element of a list and remove it from list - * @param list the ssh_list to use - * @return the first element of the list - */ -const void *_ssh_list_get_head(struct ssh_list *list); +const void *_ssh_list_pop_head(struct ssh_list *list); #define ssh_iterator_value(type, iterator)\ ((type)((iterator)->data)) @@ -61,9 +57,9 @@ const void *_ssh_list_get_head(struct ssh_list *list); /** @brief fetch the head element of a list and remove it from list * @param type type of the element to return * @param list the ssh_list to use - * @return the first element of the list + * @return the first element of the list, or NULL if the list is empty */ -#define ssh_list_get_head(type, ssh_list)\ - ((type)_ssh_list_get_head(ssh_list)) +#define ssh_list_pop_head(type, ssh_list)\ + ((type)_ssh_list_pop_head(ssh_list)) #endif /* MISC_H_ */ |