summaryrefslogtreecommitdiffstats
path: root/src/bytearray.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytearray.h')
-rw-r--r--src/bytearray.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bytearray.h b/src/bytearray.h
index 3e67d7e..b53e006 100644
--- a/src/bytearray.h
+++ b/src/bytearray.h
@@ -21,16 +21,19 @@
#ifndef BYTEARRAY_H
#define BYTEARRAY_H
#include <stdlib.h>
-#include "common.h"
+#include <stdio.h>
typedef struct bytearray_t {
void *data;
size_t len;
size_t capacity;
+ FILE *stream;
} bytearray_t;
-_PLIST_INTERNAL bytearray_t *byte_array_new();
-_PLIST_INTERNAL void byte_array_free(bytearray_t *ba);
-_PLIST_INTERNAL void byte_array_append(bytearray_t *ba, void *buf, size_t len);
+bytearray_t *byte_array_new(size_t initial);
+bytearray_t *byte_array_new_for_stream(FILE *stream);
+void byte_array_free(bytearray_t *ba);
+void byte_array_grow(bytearray_t *ba, size_t amount);
+void byte_array_append(bytearray_t *ba, void *buf, size_t len);
#endif