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. */
| 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. */ |
| 3872 | void 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 | |
| 3885 | void moduleParseCallReply_Int(RedisModuleCallReply *reply) { |
| 3886 | char *proto = reply->proto; |
no test coverage detected