mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 08:20:12 +01:00
mesa: Document that _mesa_enum_to_string() returns non-null (v2)
It always returns non-null, even if the number is an invalid enum. Cc: Haixia Shi <hshi@chromium.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Change-Id: I26e8843c96130be972e66f48a49e362442e1bf97
This commit is contained in:
parent
f9f462936a
commit
dd93cbc894
1 changed files with 6 additions and 1 deletions
|
|
@ -83,7 +83,12 @@ static int compar_nr( const int *a, enum_elt *b )
|
|||
|
||||
static char token_tmp[20];
|
||||
|
||||
const char *_mesa_enum_to_string( int nr )
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
enum_elt *elt;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue