added define get an array element count

pull/1/head
Heiko Hund 16 years ago
parent 66280bca2c
commit 4003caca8a

@ -58,6 +58,8 @@ struct security_attributes
SECURITY_DESCRIPTOR sd;
};
/* Return the number of elements in an array */
#define ELEMENTS(x) sizeof(x)/sizeof(*(x))
/* clear an object */
#define CLEAR(x) memset(&(x), 0, sizeof(x))

Loading…
Cancel
Save