debuggers.hg

view tools/libxl/flexarray.h @ 21067:b4a1832a916f

Update Xen version to 4.0.0-rc6
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 09 18:18:05 2010 +0000 (2010-03-09)
parents 8a91056bea81
children 3bbca5d47840
line source
1 /*
2 * Copyright (C) 2009 Citrix Ltd.
3 * Author Vincent Hanquez <vincent.hanquez@eu.citrix.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation; version 2.1 only. with the special
8 * exception on linking described in file LICENSE.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 */
16 #ifndef FLEXARRAY_H
17 #define FLEXARRAY_H
19 typedef struct flexarray {
20 int size;
21 int autogrow;
22 void **data; /* array of pointer */
23 } flexarray_t;
25 flexarray_t *flexarray_make(int size, int autogrow);
26 void flexarray_free(flexarray_t *array);
27 int flexarray_grow(flexarray_t *array, int extents);
28 int flexarray_set(flexarray_t *array, unsigned int index, void *ptr);
29 int flexarray_get(flexarray_t *array, int index, void **ptr);
31 void **flexarray_contents(flexarray_t *array);
33 #endif