gmio_core: add utility macro GMIO_ARRAY_SIZE()

This commit is contained in:
Hugues Delorme 2016-01-05 11:50:17 +01:00
parent 02668e0cb0
commit a26008be93

View File

@ -231,5 +231,8 @@ typedef double gmio_float64_t;
# define GMIO_PRAGMA_MSVC_WARNING_POP() # define GMIO_PRAGMA_MSVC_WARNING_POP()
#endif #endif
/*! Expands to the size(item count) of an array */
#define GMIO_ARRAY_SIZE(array) sizeof(array) / sizeof(*array)
#endif /* GMIO_GLOBAL_H */ #endif /* GMIO_GLOBAL_H */
/*! @} */ /*! @} */