<html><head></head><body>You cannot have a different typedef here. This is by design. And we already use different member names for heads and nodes.<br><br><div class="gmail_quote">Le 17 août 2018 16:04:33 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">---<br> include/vlc_list.h | 23 +++++++++++++----------<br> 1 file changed, 13 insertions(+), 10 deletions(-)<br><br>diff --git a/include/vlc_list.h b/include/vlc_list.h<br>index 45263cc789..002119db6b 100644<br>--- a/include/vlc_list.h<br>+++ b/include/vlc_list.h<br>@@ -45,6 +45,9 @@ struct vlc_list<br>     struct vlc_list *next;<br> };<br> <br>+/* type to use in list items to differentiate with the list itself */<br>+typedef struct vlc_list   vlc_list_node;<br>+<br> /**<br>  * Static initializer for a list head.<br>  */<br>@@ -66,7 +69,7 @@ static inline void vlc_list_init(struct vlc_list *restrict head)<br>  * \param prev Node pointer of the previous element.<br>  * \param next Node pointer of the next element.<br>  */<br>-static inline void vlc_list_add_between(struct vlc_list *restrict node,<br>+static inline void vlc_list_add_between(vlc_list_node *restrict node,<br>                                         struct vlc_list *prev,<br>                                         struct vlc_list *next)<br> {<br>@@ -82,7 +85,7 @@ static inline void vlc_list_add_between(struct vlc_list *restrict node,<br>  * \param node Node pointer of the element to insert [OUT].<br>  * \param prev Node pointer of the previous element.<br>  */<br>-static inline void vlc_list_add_after(struct vlc_list *restrict node,<br>+static inline void vlc_list_add_after(vlc_list_node *restrict node,<br>                                       struct vlc_list *prev)<br> {<br>     vlc_list_add_between(node, prev, prev->next);<br>@@ -94,7 +97,7 @@ static inline void vlc_list_add_after(struct vlc_list *restrict node,<br>  * \param node Node pointer of the element to insert [OUT].<br>  * \param prev Node pointer of the next element.<br>  */<br>-static inline void vlc_list_add_before(struct vlc_list *restrict node,<br>+static inline void vlc_list_add_before(vlc_list_node *restrict node,<br>                                        struct vlc_list *next)<br> {<br>     vlc_list_add_between(node, next->prev, next);<br>@@ -106,7 +109,7 @@ static inline void vlc_list_add_before(struct vlc_list *restrict node,<br>  * \param node Node pointer of the element to append to the list [OUT].<br>  * \param head Head pointer of the list to append the element to.<br>  */<br>-static inline void vlc_list_append(struct vlc_list *restrict node,<br>+static inline void vlc_list_append(vlc_list_node *restrict node,<br>                                    struct vlc_list *head)<br> {<br>     vlc_list_add_before(node, head);<br>@@ -118,7 +121,7 @@ static inline void vlc_list_append(struct vlc_list *restrict node,<br>  * \param node Node pointer of the element to prepend to the list [OUT].<br>  * \param head Head pointer of the list to prepend the element to.<br>  */<br>-static inline void vlc_list_prepend(struct vlc_list *restrict node,<br>+static inline void vlc_list_prepend(vlc_list_node *restrict node,<br>                                     struct vlc_list *head)<br> {<br>     vlc_list_add_after(node, head);<br>@@ -131,7 +134,7 @@ static inline void vlc_list_prepend(struct vlc_list *restrict node,<br>  * \warning The element must be inside a list.<br>  * Otherwise the behaviour is undefined.<br>  */<br>-static inline void vlc_list_remove(struct vlc_list *restrict node)<br>+static inline void vlc_list_remove(vlc_list_node *restrict node)<br> {<br>     struct vlc_list *prev = node->prev;<br>     struct vlc_list *next = node->next;<br>@@ -177,7 +180,7 @@ static inline bool vlc_list_is_empty(const struct vlc_list *head)<br>  * \retval false The element is not first (or is in another list).<br>  * \retval true The element is first.<br>  */<br>-static inline bool vlc_list_is_first(const struct vlc_list *node,<br>+static inline bool vlc_list_is_first(const vlc_list_node *node,<br>                                      const struct vlc_list *head)<br> {<br>     return node->prev == head;<br>@@ -192,7 +195,7 @@ static inline bool vlc_list_is_first(const struct vlc_list *node,<br>  * \retval false The element is not last (or is in another list).<br>  * \retval true The element is last.<br>  */<br>-static inline bool vlc_list_is_last(const struct vlc_list *node,<br>+static inline bool vlc_list_is_last(const vlc_list_node *node,<br>                                     const struct vlc_list *head)<br> {<br>     return node->next == head;<br>@@ -289,7 +292,7 @@ static inline void *vlc_list_last_or_null(const struct vlc_list *head,<br> }<br> <br> static inline void *vlc_list_prev_or_null(const struct vlc_list *head,<br>-                                          struct vlc_list *node,<br>+                                          vlc_list_node *node,<br>                                           size_t offset)<br> {<br>     if (vlc_list_is_first(node, head))<br>@@ -298,7 +301,7 @@ static inline void *vlc_list_prev_or_null(const struct vlc_list *head,<br> }<br> <br> static inline void *vlc_list_next_or_null(const struct vlc_list *head,<br>-                                          struct vlc_list *node,<br>+                                          vlc_list_node *node,<br>                                           size_t offset)<br> {<br>     if (vlc_list_is_last(node, head))</pre></blockquote></div><br>
-- <br>
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>