summaryrefslogtreecommitdiffstats
path: root/src/mapi
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-02-28 09:11:29 -0700
committerBrian Paul <[email protected]>2015-03-02 08:55:30 -0700
commit0a77ffcd5a22cffdbf3b70d5aa105b9b1019e704 (patch)
treee215c4d9ba62bb986722a2bc3ceafda45834a4ee /src/mapi
parentc16c719647664abf7531896770c31eda1dbe7a58 (diff)
mapi: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mapi')
-rw-r--r--src/mapi/glapi/gen/gl_enums.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
index 35919d68a41..d61618f4da0 100644
--- a/src/mapi/glapi/gen/gl_enums.py
+++ b/src/mapi/glapi/gen/gl_enums.py
@@ -83,7 +83,7 @@ const char *_mesa_lookup_enum_by_nr( int nr )
STATIC_ASSERT(sizeof(enum_string_table) < (1 << 16));
elt = bsearch(& nr, enum_string_table_offsets,
- Elements(enum_string_table_offsets),
+ ARRAY_SIZE(enum_string_table_offsets),
sizeof(enum_string_table_offsets[0]),
(cfunc) compar_nr);
@@ -127,7 +127,7 @@ static const char *prim_names[PRIM_MAX+3] = {
const char *
_mesa_lookup_prim_by_nr(GLuint nr)
{
- if (nr < Elements(prim_names))
+ if (nr < ARRAY_SIZE(prim_names))
return prim_names[nr];
else
return "invalid mode";