Commit 0cacb485 authored by Matt Stancliff's avatar Matt Stancliff
Browse files

Fix sds building with C++

These should really just be macros to shut up our type system.
parent 6a00a464
...@@ -45,12 +45,12 @@ struct sdshdr { ...@@ -45,12 +45,12 @@ struct sdshdr {
}; };
static inline size_t sdslen(const sds s) { static inline size_t sdslen(const sds s) {
struct sdshdr *sh = (void*)(s-sizeof *sh); struct sdshdr *sh = (struct sdshdr *)(s-sizeof *sh);
return sh->len; return sh->len;
} }
static inline size_t sdsavail(const sds s) { static inline size_t sdsavail(const sds s) {
struct sdshdr *sh = (void*)(s-sizeof *sh); struct sdshdr *sh = (struct sdshdr *)(s-sizeof *sh);
return sh->free; return sh->free;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment