mirror of
https://github.com/0x221E/ibuild.git
synced 2026-01-18 02:42:20 +00:00
Refactor: Remove reduntant functions from string and memory module
This commit is contained in:
@@ -14,11 +14,6 @@ StringPool string_pool_create(Arena* a)
|
|||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void string_pool_reset(StringPool* ps)
|
|
||||||
{
|
|
||||||
// arena_reset(&ps->a);
|
|
||||||
}
|
|
||||||
|
|
||||||
StringView string_create(StringPool* sp, const char* s, size_t len)
|
StringView string_create(StringPool* sp, const char* s, size_t len)
|
||||||
{
|
{
|
||||||
assert(sp != NULL);
|
assert(sp != NULL);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#define SV(sp, s) string_create(sp, s, sizeof(s) - 1)
|
#define STR_LIT(sp, s) string_create(sp, s, sizeof(s) - 1)
|
||||||
|
|
||||||
struct StringPool
|
struct StringPool
|
||||||
{
|
{
|
||||||
@@ -22,7 +22,6 @@ typedef struct StringPool StringPool;
|
|||||||
typedef struct StringView StringView;
|
typedef struct StringView StringView;
|
||||||
|
|
||||||
StringPool string_pool_create(Arena* a);
|
StringPool string_pool_create(Arena* a);
|
||||||
void string_pool_reset(StringPool* sp);
|
|
||||||
|
|
||||||
StringView string_create(StringPool* sp, const char* s, size_t len);
|
StringView string_create(StringPool* sp, const char* s, size_t len);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user