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

Function RM_CallReplyArrayElement

src/module.cpp:4009–4014  ·  view source on GitHub ↗

Return the 'idx'-th nested call reply element of an array reply, or NULL * if the reply type is wrong or the index is out of range. */

Source from the content-addressed store, hash-verified

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. */
4009RedisModuleCallReply *RM_CallReplyArrayElement(RedisModuleCallReply *reply, size_t idx) {
4010 moduleParseCallReply(reply);
4011 if (reply->type != REDISMODULE_REPLY_ARRAY) return NULL;
4012 if (idx >= reply->len) return NULL;
4013 return reply->val.array+idx;
4014}
4015
4016/* Return the long long of an integer reply. */
4017long long RM_CallReplyInteger(RedisModuleCallReply *reply) {

Callers

nothing calls this directly

Calls 1

moduleParseCallReplyFunction · 0.85

Tested by

no test coverage detected