4 * Copyright Metaparadigm Pte. Ltd. 2004.
5 * Michael Clark <michael@metaparadigm.com>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public (LGPL)
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details: http://www.gnu.org/
22 #define ARRAY_LIST_DEFAULT_SIZE 32
24 typedef void (array_list_free_fn) (void *data);
31 array_list_free_fn *free_fn;
34 extern struct array_list*
35 array_list_new(array_list_free_fn *free_fn);
38 array_list_free(struct array_list *this);
41 array_list_get_idx(struct array_list *this, int i);
44 array_list_put_idx(struct array_list *this, int i, void *data);
47 array_list_add(struct array_list *this, void *data);
50 array_list_length(struct array_list *this);