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

Function moduleParseCallReply_BulkString

app/redis-6.2.6/src/module.c:3806–3821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3804}
3805
3806void moduleParseCallReply_BulkString(RedisModuleCallReply *reply) {
3807 char *proto = reply->proto;
3808 char *p = strchr(proto+1,'\r');
3809 long long bulklen;
3810
3811 string2ll(proto+1,p-proto-1,&bulklen);
3812 if (bulklen == -1) {
3813 reply->protolen = p-proto+2;
3814 reply->type = REDISMODULE_REPLY_NULL;
3815 } else {
3816 reply->val.str = p+2;
3817 reply->len = bulklen;
3818 reply->protolen = p-proto+2+bulklen+2;
3819 reply->type = REDISMODULE_REPLY_STRING;
3820 }
3821}
3822
3823void moduleParseCallReply_SimpleString(RedisModuleCallReply *reply) {
3824 char *proto = reply->proto;

Callers 1

moduleParseCallReplyFunction · 0.85

Calls 2

strchrFunction · 0.85
string2llFunction · 0.70

Tested by

no test coverage detected