From a01ee103f9bc0c6defe9ce8cd85651f19f7127bd Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 11 Feb 2024 21:29:15 +0000 Subject: Create separate lib for patio runtime --- runtime/src/strings.c | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 runtime/src/strings.c (limited to 'runtime/src/strings.c') diff --git a/runtime/src/strings.c b/runtime/src/strings.c deleted file mode 100644 index 8ef25433..00000000 --- a/runtime/src/strings.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "./gc.h" -#include "./strings.h" - -ShedString shed__runtime__string_alloc(ShedStringLength length) { - return shed__runtime__gc_alloc(sizeof(struct ShedString) + length, 0); -} - -ShedString shed__runtime__string_add(ShedString left, ShedString right) { - ShedStringLength length = left->length + right->length; - ShedString string = shed__runtime__string_alloc(length); - string->length = length; - - for(ShedStringLength i = 0; i < left->length; i++) { - string->data[i] = left->data[i]; - } - - for(ShedStringLength i = 0; i < right->length; i++) { - string->data[left->length + i] = right->data[i]; - } - - return string; -} -- cgit v1.2.3