summaryrefslogtreecommitdiffstats
path: root/src/mapi
diff options
context:
space:
mode:
authorChad Versace <chad@kiwitree.net>2016-08-11 08:28:57 -0700
committerChad Versace <chad@kiwitree.net>2016-08-12 09:09:55 -0700
commitdd93cbc8945e182ab3130eeeb074fae798e5d4af (patch)
tree17c3f5e53d0171f2f84f7b1a60fca8c6fa7d10c7 /src/mapi
parentf9f462936ad903f93829404ce99a2580ea21b725 (diff)
downloadexternal_mesa3d-dd93cbc8945e182ab3130eeeb074fae798e5d4af.zip
external_mesa3d-dd93cbc8945e182ab3130eeeb074fae798e5d4af.tar.gz
external_mesa3d-dd93cbc8945e182ab3130eeeb074fae798e5d4af.tar.bz2
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
Diffstat (limited to 'src/mapi')
-rw-r--r--src/mapi/glapi/gen/gl_enums.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
index 62cc1b3..2eb9e16 100644
--- a/src/mapi/glapi/gen/gl_enums.py
+++ b/src/mapi/glapi/gen/gl_enums.py
@@ -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;