summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2019-06-17 00:21:18 +0000
committerOri Bernstein <ori@eigenstate.org>2019-06-17 00:21:18 +0000
commitdb72b32e7da4827a6ba6345d92aa5a64f831dade (patch)
tree4d487ed6f8226b945e04eb2f11927a8a413523a2
parent45d3a85db61e11dd8f1fb641d8cc07bc3515265b (diff)
downloadlibwapcaplet-db72b32e7da4827a6ba6345d92aa5a64f831dade.tar.gz
Allow lwc_string_ref as an expression.
-rw-r--r--include/libwapcaplet/libwapcaplet.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libwapcaplet/libwapcaplet.h b/include/libwapcaplet/libwapcaplet.h
index e48d9b0..17f57d4 100644
--- a/include/libwapcaplet/libwapcaplet.h
+++ b/include/libwapcaplet/libwapcaplet.h
@@ -150,7 +150,7 @@ lwc__intern_caseless_string(lwc_string *str);
#ifdef __GNUC__
#define lwc_string_ref(str) ({lwc_string *__lwc_s = (str); assert(__lwc_s != NULL); __lwc_s->refcnt++; __lwc_s;})
#else
-#define lwc_string_ref(str) ((str)->refcnt++, (str));
+#define lwc_string_ref(str) ((str)->refcnt++, (str))
#endif
/**
* Release a reference on an lwc_string.
@@ -280,7 +280,7 @@ lwc_string_caseless_isequal(lwc_string *s1, lwc_string *s2, bool *ret)
#ifdef __GNUC__
#define lwc_string_hash_value(str) ({assert(str != NULL); (str)->hash;})
#else
-#define lwc_string_length(str) ((str)->len)
+#define lwc_string_hash_value(str) ((str)->hash)
#endif
/**
* Retrieve a hash value for the caseless content of the string.