Switch to using Allocator in dstr

This commit is contained in:
2024-03-31 17:00:01 +01:00
parent 39c88505bd
commit 2e93bd794a
2 changed files with 30 additions and 17 deletions

View File

@@ -2,6 +2,7 @@
#define DSTR_H
#include "aliases.h"
#include "mem_allocator.h"
#ifdef __cplusplus
extern "C" {
@@ -9,8 +10,8 @@ extern "C" {
typedef struct dstr String;
String *wapp_dstr_with_capacity(u64 capacity);
String *wapp_dstr_from_string(const char *str);
String *wapp_dstr_with_capacity(u64 capacity, Allocator *allocator);
String *wapp_dstr_from_string(const char *str, Allocator *allocator);
void wapp_dstr_update(String **dst, const char *src);
void wapp_dstr_free(String **str);
void wapp_dstr_concat(String **dst, const char *src);