[Mesa-dev] [PATCH 03/14] mesa: Move debug type/severity enums to mesa core.

Eric Anholt eric at anholt.net
Tue Mar 5 13:20:25 PST 2013

Jordan Justen <jljusten at gmail.com> writes:

> On Fri, Feb 22, 2013 at 7:52 PM, Eric Anholt <eric at anholt.net> wrote:
>> +static enum mesa_debug_type
>> +gl_enum_to_debug_type(GLenum e)
>> +{
>> +   int i;
>> +
>> +   for (i = 0; i < Elements(debug_type_enums); i++) {
> I guess we have both Elements and ARRAY_SIZE. Should we try to merge these?
> Elements appears to be used more, but doesn't ARRAY_SIZE follow the
> coding style better?

Elements has been used in mesa core for longer, but ARRAY_SIZE is what
we use in the kernel, 2d driver, xserver, and libdrm, so we've used that
in our driver.  I'd love to switch to ARRAY_SIZE globally since it's
obvious what it does, while "elements" is a pretty overloaded term in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130305/dd0564ea/attachment.pgp>

More information about the mesa-dev mailing list