mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +09:00
renamed ssh_list_get_head to ssh_list_pop_head
This commit is contained in:
@@ -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_ */
|
||||
|
||||
Reference in New Issue
Block a user