I am new to hiredis and use v0.13. I noticed that the API functions from hiredis.h
, which deal with redisReply*
objects, all use void*
. For example,
void *redisCommand(redisContext *c, const char *format, ...);
returns a redisReply*
object (or NULL
);
int redisGetReply(redisContext *c, void **reply);
outputs a redisReply*
object through reply
;
void freeReplyObject(void *reply);
is, according to the code comment, a “Function to free the reply objects hiredis returns by default.”
What am I missing here—why do these functions use void*
instead of redisReply*
?