#ifndef __SAFEC_ARRAY_H #define __SAFEC_ARRAY_H #include typedef struct { size_t length; size_t elemsz; void* __data; } array_t; void array_set(array_t* array, size_t idx, void* val); void* array_get(const array_t* array, size_t idx); typedef struct { size_t length; char* __data; } str_t; void str_set(str_t* str, size_t idx, char val); char str_get(const str_t* str, size_t idx); /* TODO: I would like to implement string slicing as part of this */ /* TODO: reimplement string.h functions for this new string construct */ #endif