MCPcopy Create free account
hub / github.com/F-Stack/f-stack / RM_CreateStringFromLongLong

Function RM_CreateStringFromLongLong

app/redis-6.2.6/src/module.c:1167–1171  ·  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

1165 * The passed context 'ctx' may be NULL if necessary, see the
1166 * RedisModule_CreateString() documentation for more info. */
1167RedisModuleString *RM_CreateStringFromLongLong(RedisModuleCtx *ctx, long long ll) {
1168 char buf[LONG_STR_SIZE];
1169 size_t len = ll2string(buf,sizeof(buf),ll);
1170 return RM_CreateString(ctx,buf,len);
1171}
1172
1173/* Like RedisModule_CreatString(), but creates a string starting from a double
1174 * 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