[Mesa-dev] [PATCH 1/3] mesa: Document that _mesa_enum_to_string() returns non-null
Chad Versace
chad at kiwitree.net
Thu Aug 11 17:37:02 UTC 2016
On 08/11/2016 10:30 AM, Ian Romanick wrote:
> On 08/11/2016 10:22 AM, Ian Romanick wrote:
>> On 08/11/2016 10:11 AM, Chad Versace wrote:
>>> It always returns non-null, even if the number is an invalid enum.
>>>
>>> Cc: Haixia Shi <hshi at chromium.org>
>>> Change-Id: I26e8843c96130be972e66f48a49e362442e1bf97
>>> ---
>>> src/mapi/glapi/gen/gl_enums.py | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
>>> index 62cc1b3..4fc43ab 100644
>>> --- a/src/mapi/glapi/gen/gl_enums.py
>>> +++ b/src/mapi/glapi/gen/gl_enums.py
>>> @@ -83,6 +83,10 @@ static int compar_nr( const int *a, enum_elt *b )
>>>
>>> static char token_tmp[20];
>>>
>>> +/**
>>> + * This function always returns a string. If the number is a valid enum, it
>>> + * returns the enum name. Otherwise, it returns a numeric string.
>>> + */
>>> const char *_mesa_enum_to_string( int nr )
>>
>> Maybe take this opportunity to fix the formatting of the function.
I'll fix it before pushing.
>>
>> const char *
>> _mesa_enum_to_string(int nr)
>
> With or without this change, this patch is
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>
> The R-b for the other two is contingent on being sure patch 3 is
> actually sufficient.
More information about the mesa-dev
mailing list