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

Function moduleParseCallReply

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

3782 * use the protocol of the reply in reply->proto in order to fill the
3783 * reply with parsed data according to the reply type. */
3784void moduleParseCallReply(RedisModuleCallReply *reply) {
3785 if (!(reply->flags & REDISMODULE_REPLYFLAG_TOPARSE)) return;
3786 reply->flags &= ~REDISMODULE_REPLYFLAG_TOPARSE;
3787
3788 switch(reply->proto[0]) {
3789 case ':': moduleParseCallReply_Int(reply); break;
3790 case '$': moduleParseCallReply_BulkString(reply); break;
3791 case '-': /* handled by next item. */
3792 case '+': moduleParseCallReply_SimpleString(reply); break;
3793 case '*': moduleParseCallReply_Array(reply); break;
3794 }
3795}
3796
3797void moduleParseCallReply_Int(RedisModuleCallReply *reply) {
3798 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