debuggers.hg
annotate tools/libxl/flexarray.h @ 22848:6341fe0f4e5a
Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author | Keir Fraser <keir@xen.org> |
---|---|
date | Tue Jan 25 14:06:55 2011 +0000 (2011-01-25) |
parents | 03718b569d97 |
children |
rev | line source |
---|---|
keir@20462 | 1 /* |
keir@20462 | 2 * Copyright (C) 2009 Citrix Ltd. |
keir@20462 | 3 * Author Vincent Hanquez <vincent.hanquez@eu.citrix.com> |
keir@20462 | 4 * |
keir@20462 | 5 * This program is free software; you can redistribute it and/or modify |
keir@20462 | 6 * it under the terms of the GNU Lesser General Public License as published |
keir@20462 | 7 * by the Free Software Foundation; version 2.1 only. with the special |
keir@20462 | 8 * exception on linking described in file LICENSE. |
keir@20462 | 9 * |
keir@20462 | 10 * This program is distributed in the hope that it will be useful, |
keir@20462 | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
keir@20462 | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
keir@20462 | 13 * GNU Lesser General Public License for more details. |
keir@20462 | 14 */ |
keir@20462 | 15 |
keir@20462 | 16 #ifndef FLEXARRAY_H |
keir@20462 | 17 #define FLEXARRAY_H |
keir@20462 | 18 |
keir@20462 | 19 typedef struct flexarray { |
keir@20462 | 20 int size; |
keir@20462 | 21 int autogrow; |
gianni@22726 | 22 unsigned int count; |
keir@20462 | 23 void **data; /* array of pointer */ |
keir@20462 | 24 } flexarray_t; |
keir@20462 | 25 |
gianni@22012 | 26 _hidden flexarray_t *flexarray_make(int size, int autogrow); |
gianni@22012 | 27 _hidden void flexarray_free(flexarray_t *array); |
gianni@22012 | 28 _hidden int flexarray_grow(flexarray_t *array, int extents); |
gianni@22012 | 29 _hidden int flexarray_set(flexarray_t *array, unsigned int index, void *ptr); |
gianni@22726 | 30 _hidden int flexarray_append(flexarray_t *array, void *ptr); |
gianni@22726 | 31 _hidden int flexarray_vappend(flexarray_t *array, ...); |
gianni@22012 | 32 _hidden int flexarray_get(flexarray_t *array, int index, void **ptr); |
keir@20462 | 33 |
gianni@22012 | 34 _hidden void **flexarray_contents(flexarray_t *array); |
keir@20462 | 35 |
keir@20462 | 36 #endif |