[Mesa-dev] [PATCH] Consolidate some redundant definitions of ARRAY_SIZE() macro.

Kenneth Graunke kenneth at whitecape.org
Wed Feb 6 11:12:08 PST 2013


On 02/06/2013 10:43 AM, Paul Berry wrote:
> Previous to this patch, there were 13 identical definitions of this
> macro in Mesa source.  That's ridiculous.  This patch consolidates 6
> of them to a single definition in src/mesa/main/macros.h.
>
> Unfortunately, I wasn't able to eliminate the remaining definitions,
> since they occur in places that don't include src/mesa/main/macros.h:
>
> - include/pci_ids/pci_id_driver_map.h
> - src/egl/drivers/dri2/egl_dri2.h
> - src/egl/main/egldefines.h
> - src/gbm/main/backend.c
> - src/gbm/main/gbm.c
> - src/glx/glxclient.h
> - src/mapi/mapi/stub.c
>
> I'm open to suggestions as to how to deal with the remaining redundancy.

It's a start!

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>



More information about the mesa-dev mailing list