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

Function RM_CallReplyLength

src/module.cpp:3995–4005  ·  view source on GitHub ↗

Return the reply type length, where applicable. */

Source from the content-addressed store, hash-verified

3993
3994/* Return the reply type length, where applicable. */
3995size_t RM_CallReplyLength(RedisModuleCallReply *reply) {
3996 moduleParseCallReply(reply);
3997 switch(reply->type) {
3998 case REDISMODULE_REPLY_STRING:
3999 case REDISMODULE_REPLY_ERROR:
4000 case REDISMODULE_REPLY_ARRAY:
4001 return reply->len;
4002 default:
4003 return 0;
4004 }
4005}
4006
4007/* Return the 'idx'-th nested call reply element of an array reply, or NULL
4008 * if the reply type is wrong or the index is out of range. */

Callers

nothing calls this directly

Calls 1

moduleParseCallReplyFunction · 0.85

Tested by

no test coverage detected