[Mesa-dev] [PATCH 1/2] dri: Use designated initializers for DRI extension structs

Chad Versace chad.versace at linux.intel.com
Mon Nov 19 15:09:19 PST 2012


On 11/19/2012 02:28 PM, Kenneth Graunke wrote:
> On 11/19/2012 01:53 PM, Chad Versace wrote:
>> The dri directory is compiled with -std=c99. There is no excuse to not use
>> designated initializers.
>>
>> As a nice benefit, the code is now more friendly to grep. Without
>> designated initializers, psychic prowess is required to find the
>> initialization of DRI extension function pointers with grep.  I have
>> observed several people, when they first encounter the DRI code, fail at
>> statically chasing the DRI function pointers due to this problem.
>>
>> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
>> ---
>>   src/mesa/drivers/dri/common/dri_util.c | 57 ++++++++++++++++++----------------
>>   1 file changed, 30 insertions(+), 27 deletions(-)
> 
> Both are:
> Acked-by: Kenneth Graunke <kenneth at whitecape.org>
> 
> because I definitely like the change to use designated initializers, but I
> didn't bother to verify that you're still initializing everything correctly.

I triple-checked the patches. I promise they're correct :)



More information about the mesa-dev mailing list