2 * $Id: arraylist.h,v 1.4 2006/01/26 02:16:28 mclark Exp $
4 * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
5 * Michael Clark <michael@metaparadigm.com>
7 * This library is free software; you can redistribute it and/or modify
8 * it under the terms of the MIT license. See COPYING for details.
19 #define ARRAY_LIST_DEFAULT_SIZE 32
21 typedef void (array_list_free_fn) (void *data);
28 array_list_free_fn *free_fn;
31 extern struct array_list*
32 array_list_new(array_list_free_fn *free_fn);
35 array_list_free(struct array_list *al);
38 array_list_get_idx(struct array_list *al, int i);
41 array_list_put_idx(struct array_list *al, int i, void *data);
44 array_list_add(struct array_list *al, void *data);
47 array_list_length(struct array_list *al);