code / tomo

Lines41.3K C23.7K Markdown9.7K YAML5.0K Tomo2.3K
7 others 763
Python231 Shell230 make212 INI47 Text21 SVG16 Lua6
(20 lines)
1 // Type info and methods for CString datatype, which represents C's `char*`
3 #pragma once
5 #include <stdbool.h>
6 #include <stdint.h>
8 #include "types.h"
9 #include "util.h"
11 Text_t CString$as_text(const char **str, bool colorize, const TypeInfo_t *info);
12 PUREFUNC int CString$compare(const void *x, const void *y, const TypeInfo_t *type);
13 PUREFUNC bool CString$equal(const void *x, const void *y, const TypeInfo_t *type);
14 PUREFUNC uint64_t CString$hash(const void *str, const TypeInfo_t *type);
15 PUREFUNC bool CString$is_none(const void *c_str, const TypeInfo_t *info);
16 const char *CString$join(const char *glue, List_t strings);
17 void CString$serialize(const void *obj, FILE *out, Table_t *pointers, const TypeInfo_t *info);
18 void CString$deserialize(FILE *in, void *out, List_t *pointers, const TypeInfo_t *info);
20 extern const TypeInfo_t CString$info;