Add ARRAY_AND_SIZE macro

Just a handy macro
This commit is contained in:
Daniel Ribeiro 2011-01-09 03:48:39 -02:00
parent 4c046c6bcc
commit dfa4b731da
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,10 @@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#endif
#ifndef ARRAY_AND_SIZE
#define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a)
#endif
/* Data types, used by hardware plugins for set_configuration() */
enum {
T_UINT64,