addition: init and destroy ByteString
This commit is contained in:
@@ -1,6 +1,19 @@
|
||||
#ifndef LAE_STRINGS_H
|
||||
#define LAE_STRINGS_H
|
||||
|
||||
#include "lae_allocator.h"
|
||||
typedef struct ByteStr ByteStr;
|
||||
|
||||
typedef enum {
|
||||
STR_OK,
|
||||
STR_BAD_ALLOC,
|
||||
STR_OUT_OF_BOUNDS,
|
||||
STR_NULL_ARG,
|
||||
STR_NULL_STRING,
|
||||
STR_INVALID_CAPACITY,
|
||||
} StringErr;
|
||||
|
||||
StringErr bstr_init(ByteStr **bstr, Allocator alloc, size_t capacity);
|
||||
StringErr bstr_destroy(ByteStr **bstr);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user