summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-04-21 14:27:03 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-04-21 14:27:03 +0200
commit026636b0cd4baf5ff90b607118b6b4394edcdd05 (patch)
treef244f3dec81a0bd9fc7d8d19f0ec9cfa503c5940 /hiredis.h
parentf0307c61724c19fa4b1788f7b6b3ca83387ea8be (diff)
Remove accessor functions now the redisReader struct is public
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/hiredis.h b/hiredis.h
index 514025b..55311ba 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -135,12 +135,14 @@ void freeReplyObject(void *reply);
redisReader *redisReplyReaderCreate(void);
int redisReplyReaderSetReplyObjectFunctions(redisReader *reader, redisReplyObjectFunctions *fn);
int redisReplyReaderSetPrivdata(redisReader *reader, void *privdata);
-void *redisReplyReaderGetObject(redisReader *reader);
-char *redisReplyReaderGetError(redisReader *reader);
void redisReplyReaderFree(redisReader *ptr);
void redisReplyReaderFeed(redisReader *reader, const char *buf, size_t len);
int redisReplyReaderGetReply(redisReader *reader, void **reply);
+/* Backwards compatibility, can be removed on big version bump. */
+#define redisReplyReaderGetObject(_r) (((redisReader*)(r))->reply)
+#define redisReplyReaderGetError(_r) (((redisReader*)(r))->errstr)
+
/* Functions to format a command according to the protocol. */
int redisvFormatCommand(char **target, const char *format, va_list ap);
int redisFormatCommand(char **target, const char *format, ...);