src/cx/common.h

changeset 945
84a5fab8a47c
parent 934
a43ed636d1ff
equal deleted inserted replaced
944:c26299cc9897 945:84a5fab8a47c
115 size_t, 115 size_t,
116 size_t, 116 size_t,
117 void * 117 void *
118 ); 118 );
119 119
120 /**
121 * Determines the number of members in a static C array.
122 *
123 * @attention never use this to determine the size of a dynamically allocated
124 * array.
125 *
126 * @param arr the array identifier
127 * @return the number of elements
128 */
129 #define cx_nmemb(arr) (sizeof(arr)/sizeof((arr)[0]))
120 130
121 // Compiler specific stuff 131 // Compiler specific stuff
122 132
123 #ifndef __GNUC__ 133 #ifndef __GNUC__
124 /** 134 /**

mercurial