[vlc-devel] [PATCH 1/4] vlc_list: helpers for doubly linked lists
Rémi Denis-Courmont
remi at remlab.net
Thu Jun 14 20:45:28 CEST 2018
Le keskiviikkona 13. kesäkuuta 2018, 22.45.46 EEST Romain Vimont a écrit :
> On Wed, Jun 13, 2018 at 12:55:17PM +0300, Rémi Denis-Courmont wrote:
> > pos is an l-value, not necessarily a variable. If you look at existing
> > array macros usages, quite often the l-values for array and size are not
> > variables, so I don't think we should make that assumption.
> What about using a name that will never shadow in practice?
> for( struct vlc_list_t
> _an_awful_name_that_will_never_shadow_user_code_in_practice; … )
>
> They would only shadow to provide the expected behavior for nested
> foreach loops.
...which would be terrible since nested loops obviously must be supported for
some more complex data structures, and shadowed variables cause warnings.
--
Реми Дёни-Курмон
http://www.remlab.net/
More information about the vlc-devel
mailing list