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

Function moduleParseCallReply

src/module.cpp:3872–3883  ·  view source on GitHub ↗

Do nothing if REDISMODULE_REPLYFLAG_TOPARSE is false, otherwise * use the protocol of the reply in reply->proto in order to fill the * reply with parsed data according to the reply type. */

Source from the content-addressed store, hash-verified

3870 * use the protocol of the reply in reply->proto in order to fill the
3871 * reply with parsed data according to the reply type. */
3872void moduleParseCallReply(RedisModuleCallReply *reply) {
3873 if (!(reply->flags & REDISMODULE_REPLYFLAG_TOPARSE)) return;
3874 reply->flags &= ~REDISMODULE_REPLYFLAG_TOPARSE;
3875
3876 switch(reply->proto[0]) {
3877 case ':': moduleParseCallReply_Int(reply); break;
3878 case '$': moduleParseCallReply_BulkString(reply); break;
3879 case '-': /* handled by next item. */
3880 case '+': moduleParseCallReply_SimpleString(reply); break;
3881 case '*': moduleParseCallReply_Array(reply); break;
3882 }
3883}
3884
3885void moduleParseCallReply_Int(RedisModuleCallReply *reply) {
3886 char *proto = reply->proto;

Callers 6

RM_CallReplyLengthFunction · 0.85
RM_CallReplyArrayElementFunction · 0.85
RM_CallReplyIntegerFunction · 0.85
RM_CallReplyStringPtrFunction · 0.85

Tested by

no test coverage detected