Open senyai opened 3 years ago
@senyai I think -1 will work for void* because I do not think that could possibly be a valid pointer in either 32 or 64 bit addressing systems, but you're right something have to be done about this magic number, maybe we could introduce a constant.
I support this feature request, as it will not work for types like structs (kinda weird as you should use a pointer) but for UNIONS there is some problems, as you need to access a "field" (or interpretation of data). Maybe something in the lines of
#define HASHDICT_DEFAULT_ASSIGNMENT_OPERATION node->value.f64 = 0.
Thank you for the great work!
Hi!
The documentations says the value type is defined as int in the header file, you can redefine it to the required type, which could be char or void* or anything you need., but https://github.com/exebook/hashdict.c/blob/d821398128ecbc964c381849603ec5bd4a0d7bbf/hashdict.c#L26 assigns -1 to that value and you can't assing -1 to a
void *
, don't you?