* Retrieves the element from the supplied array located at the zero-based * index of 'idx' and copies its value into the variable pointed to by the pointer * 'p'. */
| 193 | * 'p'. |
| 194 | */ |
| 195 | static inline void zarray_get(const zarray_t *za, int idx, void *p) |
| 196 | { |
| 197 | assert(za != NULL); |
| 198 | assert(p != NULL); |
| 199 | assert(idx >= 0); |
| 200 | assert(idx < za->size); |
| 201 | |
| 202 | memcpy(p, &za->data[idx*za->el_sz], za->el_sz); |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * Similar to zarray_get(), but returns a "live" pointer to the internal |
no outgoing calls