diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-04-21 14:37:29 +0200 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-04-21 14:37:29 +0200 |
commit | a9262322938d04226be2410aa20460a31d4a4a51 (patch) | |
tree | 488b363e8dfe285c4c6f7e71493d360fb2d684ad | |
parent | 5ba49014da410b3e671c341469ac372d6a383822 (diff) |
Reply object functions can be set by the user after creating the reader
-rw-r--r-- | hiredis.c | 10 | ||||
-rw-r--r-- | hiredis.h | 1 |
2 files changed, 0 insertions, 11 deletions
@@ -542,16 +542,6 @@ redisReader *redisReplyReaderCreate(void) { return r; } -/* Set the function set to build the reply. Returns REDIS_OK when there - * is no temporary object and it can be set, REDIS_ERR otherwise. */ -int redisReplyReaderSetReplyObjectFunctions(redisReader *r, redisReplyObjectFunctions *fn) { - if (r->reply == NULL) { - r->fn = fn; - return REDIS_OK; - } - return REDIS_ERR; -} - void redisReplyReaderFree(redisReader *r) { if (r->reply != NULL && r->fn && r->fn->freeObject) r->fn->freeObject(r->reply); @@ -133,7 +133,6 @@ typedef struct redisReader { void freeReplyObject(void *reply); redisReader *redisReplyReaderCreate(void); -int redisReplyReaderSetReplyObjectFunctions(redisReader *r, redisReplyObjectFunctions *fn); void redisReplyReaderFree(redisReader *r); void redisReplyReaderFeed(redisReader *r, const char *buf, size_t len); int redisReplyReaderGetReply(redisReader *r, void **reply); |