We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bad0019 + bd65a6d commit 56a5749Copy full SHA for 56a5749
sds.h
@@ -80,7 +80,11 @@ struct __attribute__ ((__packed__)) sdshdr64 {
80
#define SDS_TYPE_64 4
81
#define SDS_TYPE_MASK 7
82
#define SDS_TYPE_BITS 3
83
+#ifdef __cplusplus
84
+#define SDS_HDR_VAR(T, s) struct sdshdr##T *sh = (struct sdshdr##T *)((s) - (sizeof(struct sdshdr##T)));
85
+#else
86
#define SDS_HDR_VAR(T,s) struct sdshdr##T *sh = (void*)((s)-(sizeof(struct sdshdr##T)));
87
+#endif
88
#define SDS_HDR(T,s) ((struct sdshdr##T *)((s)-(sizeof(struct sdshdr##T))))
89
#define SDS_TYPE_5_LEN(f) ((f)>>SDS_TYPE_BITS)
90
0 commit comments