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

Function RM_CallReplyStringPtr

src/module.cpp:4024–4030  ·  view source on GitHub ↗

Return the pointer and length of a string or error reply. */

Source from the content-addressed store, hash-verified

4022
4023/* Return the pointer and length of a string or error reply. */
4024const char *RM_CallReplyStringPtr(RedisModuleCallReply *reply, size_t *len) {
4025 moduleParseCallReply(reply);
4026 if (reply->type != REDISMODULE_REPLY_STRING &&
4027 reply->type != REDISMODULE_REPLY_ERROR) return NULL;
4028 if (len) *len = reply->len;
4029 return reply->val.str;
4030}
4031
4032/* Return a new string object from a call reply of type string, error or
4033 * integer. Otherwise (wrong reply type) return NULL. */

Callers

nothing calls this directly

Calls 1

moduleParseCallReplyFunction · 0.85

Tested by

no test coverage detected