MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / moduleZsetAddFlagsToCoreFlags

Function moduleZsetAddFlagsToCoreFlags

src/module.cpp:2690–2697  ·  view source on GitHub ↗

Conversion from/to public flags of the Modules API and our private flags, * so that we have everything decoupled. */

Source from the content-addressed store, hash-verified

2688/* Conversion from/to public flags of the Modules API and our private flags,
2689 * so that we have everything decoupled. */
2690int moduleZsetAddFlagsToCoreFlags(int flags) {
2691 int retflags = 0;
2692 if (flags & REDISMODULE_ZADD_XX) retflags |= ZADD_IN_XX;
2693 if (flags & REDISMODULE_ZADD_NX) retflags |= ZADD_IN_NX;
2694 if (flags & REDISMODULE_ZADD_GT) retflags |= ZADD_IN_GT;
2695 if (flags & REDISMODULE_ZADD_LT) retflags |= ZADD_IN_LT;
2696 return retflags;
2697}
2698
2699/* See previous function comment. */
2700int moduleZsetAddFlagsFromCoreFlags(int flags) {

Callers 2

RM_ZsetAddFunction · 0.85
RM_ZsetIncrbyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected