/* values = _cairo_array_index (&array, 0); for (i = 0; i < _cairo_array_num_elements (&array); i++) ... use values here ... </programlisting></informalexample>  */
void* _cairo_array_index(cairo_array_t *array, unsigned int index)
/* values = _cairo_array_index (&array, 0); for (i = 0; i < _cairo_array_num_elements (&array); i++) ... use values here ... </programlisting></informalexample>  */
void* _cairo_array_index(cairo_array_t *array, unsigned int index)
{
    if (index == 0 && array->num_elements == 0)
	return NULL;
    assert (index < array->num_elements);
    return array->elements + index * array->element_size;
}