summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-04-21 14:37:29 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-04-21 14:37:29 +0200
commita9262322938d04226be2410aa20460a31d4a4a51 (patch)
tree488b363e8dfe285c4c6f7e71493d360fb2d684ad
parent5ba49014da410b3e671c341469ac372d6a383822 (diff)
Reply object functions can be set by the user after creating the reader
-rw-r--r--hiredis.c10
-rw-r--r--hiredis.h1
2 files changed, 0 insertions, 11 deletions
diff --git a/hiredis.c b/hiredis.c
index 7598e19..1f06d9f 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -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);
diff --git a/hiredis.h b/hiredis.h
index 55342a3..6fb9e27 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -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);