From 0aecb135c9fa0839d9f65f855a84957e3e54d747 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 27 Sep 2018 11:46:22 +0200 Subject: [PATCH] Modules: Modules: dictionary API WIP #13: Compare API exported. --- src/module.c | 2 ++ src/redismodule.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/module.c b/src/module.c index 9c3d45f4c..2be07ca77 100644 --- a/src/module.c +++ b/src/module.c @@ -5040,4 +5040,6 @@ void moduleRegisterCoreAPI(void) { REGISTER_API(DictPrevC); REGISTER_API(DictNext); REGISTER_API(DictPrev); + REGISTER_API(DictCompareC); + REGISTER_API(DictCompare); } diff --git a/src/redismodule.h b/src/redismodule.h index 069cfe969..d18c38881 100644 --- a/src/redismodule.h +++ b/src/redismodule.h @@ -299,6 +299,8 @@ void *REDISMODULE_API_FUNC(RedisModule_DictNextC)(RedisModuleDictIter *di, size_ void *REDISMODULE_API_FUNC(RedisModule_DictPrevC)(RedisModuleDictIter *di, size_t *keylen, void **dataptr); RedisModuleString *REDISMODULE_API_FUNC(RedisModule_DictNext)(RedisModuleCtx *ctx, RedisModuleDictIter *di, void **dataptr); RedisModuleString *REDISMODULE_API_FUNC(RedisModule_DictPrev)(RedisModuleCtx *ctx, RedisModuleDictIter *di, void **dataptr); +int REDISMODULE_API_FUNC(RedisModule_DictCompareC)(RedisModuleDictIter *di, const char *op, void *key, size_t keylen); +int REDISMODULE_API_FUNC(RedisModule_DictCompare)(RedisModuleDictIter *di, const char *op, RedisModuleString *key); /* Experimental APIs */ #ifdef REDISMODULE_EXPERIMENTAL_API @@ -459,6 +461,8 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int REDISMODULE_GET_API(DictPrevC); REDISMODULE_GET_API(DictNext); REDISMODULE_GET_API(DictPrev); + REDISMODULE_GET_API(DictCompare); + REDISMODULE_GET_API(DictCompareC); #ifdef REDISMODULE_EXPERIMENTAL_API REDISMODULE_GET_API(GetThreadSafeContext);