diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-11-13 16:28:13 -0500 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-11-13 16:28:13 -0500 |
| commit | c3d23d3091c23978b12c140e6cfd964eff1d3986 (patch) | |
| tree | 3342a73aea427fa19d2b0936a98e37fbe479c85d /source/string.c | |
| parent | 75c8828d804f45cf8f44af73bfe87e0f3eaf9a9e (diff) | |
Diffstat (limited to 'source/string.c')
| -rw-r--r-- | source/string.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/source/string.c b/source/string.c deleted file mode 100644 index 10c0820..0000000 --- a/source/string.c +++ /dev/null @@ -1,25 +0,0 @@ - -#include "kpl.h" - -static const kpl_interface object_string_interface = { - .gc_mark_object_fn = NULL, - .native_free_fn = NULL, - .log_fn = NULL, - .copy_fn = NULL -}; - -kpl_object_string *kpl_object_string_create(kpl_thread *thread, int32_t bytes_size) { - if (bytes_size < 0) - return NULL; - bytes_size++; - kpl_object_string *object_string = kpl_gc_new(thread, &object_string_interface, - sizeof(kpl_object_string) + sizeof(uint8_t) * bytes_size); - object_string->bytes_length = 0; - object_string->bytes_size = object_string->object_size - sizeof(kpl_object_string); - memset(object_string->bytes, '\0', object_string->bytes_size); - return object_string; -} - -extern inline kpl_object_string *kpl_object_string_from_c_string(kpl_thread *thread, const char *c_string); - -extern inline void kpl_object_string_destroy(kpl_thread *thread, kpl_object_string *object_string); |
