Open franzflasch opened 4 years ago
Is there actually any reason for using a (void) cast instead of just using (struct sdshdr##T)? I find #ifdefs rather ugly and I don't see any drawback of casting to (struct sdshdr##T*), but maybe there is some case which I don't see...
I know that sds is a library solely intended for C but I happened to include the header "sds.h" in a C++ application, I don't want to go into details why I needed to do this. However, when compiling the C++ application I get some of these errors:
A minor change in the header would fix this issue. I don't think that it breaks anything, but I think you @antirez know best if it causes side-effects or not.
I've tested this change with in my Application and it works fine in C and C++ so far.