summaryrefslogtreecommitdiffstats
path: root/src/ptrarray.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ptrarray.h')
-rw-r--r--src/ptrarray.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ptrarray.h b/src/ptrarray.h
index e8a3c88..2c6136a 100644
--- a/src/ptrarray.h
+++ b/src/ptrarray.h
@@ -2,7 +2,7 @@
2 * ptrarray.h 2 * ptrarray.h
3 * header file for simple pointer array implementation 3 * header file for simple pointer array implementation
4 * 4 *
5 * Copyright (c) 2011 Nikias Bassen, All Rights Reserved. 5 * Copyright (c) 2011-2019 Nikias Bassen, All Rights Reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
@@ -24,13 +24,16 @@
24 24
25typedef struct ptrarray_t { 25typedef struct ptrarray_t {
26 void **pdata; 26 void **pdata;
27 size_t len; 27 long len;
28 size_t capacity; 28 long capacity;
29 size_t capacity_step; 29 long capacity_step;
30} ptrarray_t; 30} ptrarray_t;
31 31
32ptrarray_t *ptr_array_new(int capacity); 32ptrarray_t *ptr_array_new(int capacity);
33void ptr_array_free(ptrarray_t *pa); 33void ptr_array_free(ptrarray_t *pa);
34void ptr_array_add(ptrarray_t *pa, void *data); 34void ptr_array_add(ptrarray_t *pa, void *data);
35void* ptr_array_index(ptrarray_t *pa, size_t index); 35void ptr_array_insert(ptrarray_t *pa, void *data, long index);
36void ptr_array_remove(ptrarray_t *pa, long index);
37void ptr_array_set(ptrarray_t *pa, void *data, long index);
38void* ptr_array_index(ptrarray_t *pa, long index);
36#endif 39#endif