Fix sds building with C++
These should really just be macros to shut up our type system.
This commit is contained in:
parent
6a00a4643b
commit
0cacb485fe
4
sds.h
4
sds.h
|
@ -45,12 +45,12 @@ struct sdshdr {
|
|||
};
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue