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

Function RM_CreateStringFromStreamID

app/redis-6.2.6/src/module.c:1218–1223  ·  view source on GitHub ↗

Creates a string from a stream ID. The returned string must be released with * RedisModule_FreeString(), unless automatic memory is enabled. * * 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

1216 * The passed context `ctx` may be NULL if necessary. See the
1217 * RedisModule_CreateString() documentation for more info. */
1218RedisModuleString *RM_CreateStringFromStreamID(RedisModuleCtx *ctx, const RedisModuleStreamID *id) {
1219 streamID streamid = {id->ms, id->seq};
1220 RedisModuleString *o = createObjectFromStreamID(&streamid);
1221 if (ctx != NULL) autoMemoryAdd(ctx, REDISMODULE_AM_STRING, o);
1222 return o;
1223}
1224
1225/* Free a module string object obtained with one of the Redis modules API calls
1226 * that return new string objects.

Callers

nothing calls this directly

Calls 2

createObjectFromStreamIDFunction · 0.85
autoMemoryAddFunction · 0.85

Tested by

no test coverage detected