summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--darray.c9
-rw-r--r--darray.h23
2 files changed, 0 insertions, 32 deletions
diff --git a/darray.c b/darray.c
index 8f796d6..6585d30 100644
--- a/darray.c
+++ b/darray.c
@@ -15,7 +15,6 @@
****************************************************************************/
#include "darray.h"
-#include <assert.h>
#include <stdlib.h>
#include <string.h>
@@ -97,14 +96,6 @@ int darray_check(void *da) {
}
}
-size_t darray_pop(void *da) {
- assert(da);
-
- struct darray *header = darray_header(da);
- assert(header->length > 0);
- return --header->length;
-}
-
void darray_free(void *da) {
if (da) {
free(darray_header(da));
diff --git a/darray.h b/darray.h
index e2d0e10..4464381 100644
--- a/darray.h
+++ b/darray.h
@@ -87,18 +87,6 @@ void *darray_push(void *da, const void *item, size_t size);
int darray_check(void *da);
/**
- * @internal Use DARRAY_POP().
- *
- * Pop an element from an array.
- *
- * @param da
- * The array in question.
- * @return
- * The (new) length of the array.
- */
-size_t darray_pop(void *da);
-
-/**
* Free a darray.
*
* @param da
@@ -119,15 +107,4 @@ void darray_free(void *da);
#define DARRAY_PUSH(da, item) \
(darray_check(*(da) = darray_push(*(da), (item), sizeof(**(da) = *(item)))))
-/**
- * Pop an item from a darray.
- *
- * @param da
- * The array to pop from.
- * @return
- * The popped item.
- */
-#define DARRAY_POP(da) \
- ((da)[darray_pop((da))])
-
#endif // BFS_DARRAY_H