diff options
Diffstat (limited to 'mesalib/src/mesa/main/macros.h')
-rw-r--r-- | mesalib/src/mesa/main/macros.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h index d1e81fe08..f6d38fb64 100644 --- a/mesalib/src/mesa/main/macros.h +++ b/mesalib/src/mesa/main/macros.h @@ -766,5 +766,8 @@ DIFFERENT_SIGNS(GLfloat x, GLfloat y) #define ENUM_TO_DOUBLE(E) ((GLdouble)(GLint)(E)) #define ENUM_TO_BOOLEAN(E) ((E) ? GL_TRUE : GL_FALSE) +/* Compute the size of an array */ +#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) + #endif |