Go to the documentation of this file.
16 void *type_str_copy(
const void *str)
23 int type_str_cmp(
const void *str1,
const void *str2)
28 size_t type_str_hash(
const void *str,
size_t M)
37 hash = ((hash << 6) - hash + *s) % M;
43 static const t_type g_type_str_struct = {
45 .copy = &type_str_copy,
48 .hash = &type_str_hash,
char * name
The name of a datatype as a string.
int ds_strcmp(const char *s1, const char *s2)
Replicates strcmp from libc.
const t_type * g_type_str
A representation of the char* data type.
A full representation of a data type, used to achieve polymorphism in the implementation of data stru...
char * ds_strdup(const char *s1)
Replicates behaviour of strdup from libc.