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

Function RM_CreateStringFromLongLong

src/module.cpp:1194–1198  ·  view source on GitHub ↗

Like RedisModule_CreatString(), but creates a string starting from a long long * integer instead of taking a buffer and its length. * * The returned string must be released with RedisModule_FreeString() or by * enabling automatic memory management. * * The passed context 'ctx' may be NULL if necessary, see the * RedisModule_CreateString() documentation for more info. */

Source from the content-addressed store, hash-verified

1192 * The passed context 'ctx' may be NULL if necessary, see the
1193 * RedisModule_CreateString() documentation for more info. */
1194RedisModuleString *RM_CreateStringFromLongLong(RedisModuleCtx *ctx, long long ll) {
1195 char buf[LONG_STR_SIZE];
1196 size_t len = ll2string(buf,sizeof(buf),ll);
1197 return RM_CreateString(ctx,buf,len);
1198}
1199
1200/* Like RedisModule_CreatString(), but creates a string starting from a double
1201 * instead of taking a buffer and its length.

Callers

nothing calls this directly

Calls 2

ll2stringFunction · 0.85
RM_CreateStringFunction · 0.85

Tested by

no test coverage detected