From 3c4a69fe366583c6112fe0437f1933ced5a1cbb0 Mon Sep 17 00:00:00 2001 From: John Sully Date: Sat, 9 Mar 2019 13:42:08 -0500 Subject: [PATCH] Make storage.h C++ safe Former-commit-id: cc98d10fc695dd61b1ef5d96ac2866a877111e50 --- src/storage.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/storage.h b/src/storage.h index fa3cd5b8c..5aee09817 100644 --- a/src/storage.h +++ b/src/storage.h @@ -3,6 +3,10 @@ #define OBJ_ENCODING_EMBSTR_SIZE_LIMIT 44 // Note: also defined in object.c - should always match +#ifdef __cplusplus +extern "C" { +#endif + enum MALLOC_CLASS { MALLOC_LOCAL, @@ -22,4 +26,8 @@ void sfree_objembstr(struct redisObject *obj); struct redisObject *salloc_obj(); void sfree_obj(struct redisObject *obj); +#ifdef __cplusplus +} +#endif + #endif