On Wednesday 2017-05-10 17:20, Dima Ryazanov wrote:
>      +#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a)[0])
>
>
>I'm guessing this works, but "sizeof(a)[0]" looks very unintuitive to me. I 
>think "sizeof(a[0])" is
>the convention?

If going with the sizeof(T) syntax, then the answer would 
be "sizeof((a)[0])", or alternatively, "sizeof(*(a))".
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to