Skip to content

Commit bd01f10

Browse files
authored
Merge pull request #1310 from JonasKruckenberg/patch-1
Add C++ compatibility to sds.h
2 parents deb2a31 + 04e85b8 commit bd01f10

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sds.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ typedef intptr_t ssize_t;
4646
#include <stdarg.h>
4747
#include <stdint.h>
4848

49+
#ifdef __cplusplus
50+
extern "C" {
51+
#endif
52+
4953
typedef char *sds;
5054

5155
/* Note: sdshdr5 is never used, we just access the flags byte directly.
@@ -277,4 +281,7 @@ void sds_free(void *ptr);
277281
int sdsTest(int argc, char *argv[]);
278282
#endif
279283

284+
#ifdef __cplusplus
285+
}
286+
#endif
280287
#endif

0 commit comments

Comments
 (0)