Return the pointer and length of a string or error reply. */
| 3934 | |
| 3935 | /* Return the pointer and length of a string or error reply. */ |
| 3936 | const char *RM_CallReplyStringPtr(RedisModuleCallReply *reply, size_t *len) { |
| 3937 | moduleParseCallReply(reply); |
| 3938 | if (reply->type != REDISMODULE_REPLY_STRING && |
| 3939 | reply->type != REDISMODULE_REPLY_ERROR) return NULL; |
| 3940 | if (len) *len = reply->len; |
| 3941 | return reply->val.str; |
| 3942 | } |
| 3943 | |
| 3944 | /* Return a new string object from a call reply of type string, error or |
| 3945 | * integer. Otherwise (wrong reply type) return NULL. */ |
nothing calls this directly
no test coverage detected