From 2312964be0bc25587732085344a0e29cb60db455 Mon Sep 17 00:00:00 2001 From: rafie Date: Sun, 23 Oct 2022 13:01:03 +0300 Subject: [PATCH 1/2] Avoid definitions of RedisModule symbols --- src/redismodule.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/redismodule.h b/src/redismodule.h index e935c85..87cb9a5 100644 --- a/src/redismodule.h +++ b/src/redismodule.h @@ -1,10 +1,16 @@ #ifndef REDISMODULE_H #define REDISMODULE_H +// clang-format off + #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + /* ---------------- Defines common between core and modules --------------- */ /* Error status return values. */ @@ -567,6 +573,10 @@ typedef struct RedisModuleTypeMethods { RedisModule_GetApi("RedisModule_" #name, ((void **)&RedisModule_ ## name)) /* Default API declaration prefix (not 'extern' for backwards compatibility) */ +#ifndef REDISMODULE_MAIN +#define REDISMODULE_API extern +#endif + #ifndef REDISMODULE_API #define REDISMODULE_API #endif @@ -1134,4 +1144,9 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int #define RedisModuleString robj #endif /* REDISMODULE_CORE */ + +#ifdef __cplusplus +} +#endif + #endif /* REDISMODULE_H */ From 290d17d751bf9590c32d891943d2327a51f8cca7 Mon Sep 17 00:00:00 2001 From: rafie Date: Sun, 23 Oct 2022 13:11:34 +0300 Subject: [PATCH 2/2] Fix build problem in CI --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3cf4da8..acc326e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,12 +20,12 @@ jobs: - run: name: get readies command: git clone https://github.com/RedisLabsModules/readies.git - - run: - name: Install gcc-9 - command: ./readies/bin/getgcc --modern - run: name: Install python3 command: ./readies/bin/getpy3 + - run: + name: Install gcc-9 + command: ./readies/bin/getgcc --modern - run: name: Install rust command: ./readies/bin/getrust