From 94c816fbed2882f7dc0127f05f4ee74ffdccc21b Mon Sep 17 00:00:00 2001 From: Tyge Date: Thu, 23 Apr 2020 17:09:17 +0200 Subject: Fixed bugs with use of "Raw" types, and updated EXAMPLE.md accordingly. --- stc/cstring.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'stc/cstring.h') diff --git a/stc/cstring.h b/stc/cstring.h index 454ff48c..99ab4e81 100644 --- a/stc/cstring.h +++ b/stc/cstring.h @@ -293,9 +293,11 @@ cstring_temp(const char* str) { /* CVector / CMap API functions: */ -#define cstring_getRaw(x) (&(x)->str) +#define cstring_getRaw(x) ((x)->str) #define cstring_compareRaw(x, y) strcmp(*(x), *(y)) #define cstring_equalsRaw(x, y) (strcmp(*(x), *(y)) == 0) -static inline uint32_t cstring_hashRaw(const char* const* str, size_t ignored) { return c_defaultHash(*str, strlen(*str)); } +static inline uint32_t cstring_hashRaw(const char* const* sPtr, size_t ignored) { + return c_defaultHash(*sPtr, strlen(*sPtr)); +} #endif -- cgit v1.2.3