summaryrefslogtreecommitdiffstats
path: root/src/ptrarray.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ptrarray.h')
-rw-r--r--src/ptrarray.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/ptrarray.h b/src/ptrarray.h
index 84f9ef0..ed67351 100644
--- a/src/ptrarray.h
+++ b/src/ptrarray.h
@@ -2,7 +2,7 @@
* ptrarray.h
* header file for simple pointer array implementation
*
- * Copyright (c) 2011 Nikias Bassen, All Rights Reserved.
+ * Copyright (c) 2011-2019 Nikias Bassen, All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,17 +21,20 @@
#ifndef PTRARRAY_H
#define PTRARRAY_H
#include <stdlib.h>
-#include "common.h"
typedef struct ptrarray_t {
void **pdata;
- size_t len;
- size_t capacity;
- size_t capacity_step;
+ long len;
+ long capacity;
+ long capacity_step;
} ptrarray_t;
-_PLIST_INTERNAL ptrarray_t *ptr_array_new(int capacity);
-_PLIST_INTERNAL void ptr_array_free(ptrarray_t *pa);
-_PLIST_INTERNAL void ptr_array_add(ptrarray_t *pa, void *data);
-_PLIST_INTERNAL void* ptr_array_index(ptrarray_t *pa, size_t index);
+ptrarray_t *ptr_array_new(int capacity);
+void ptr_array_free(ptrarray_t *pa);
+void ptr_array_add(ptrarray_t *pa, void *data);
+void ptr_array_insert(ptrarray_t *pa, void *data, long index);
+void ptr_array_remove(ptrarray_t *pa, long index);
+void ptr_array_set(ptrarray_t *pa, void *data, long index);
+void* ptr_array_index(ptrarray_t *pa, long index);
+long ptr_array_size(ptrarray_t *pa);
#endif