diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-04-21 14:34:03 +0200 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-04-21 14:34:03 +0200 |
commit | 5ba49014da410b3e671c341469ac372d6a383822 (patch) | |
tree | 7ea7dd4825943ce6bd6639dfaf0b84a54dc845a8 /hiredis.h | |
parent | 2002218981c4aa6ab8a55e9513962adc2268b657 (diff) |
Privdata can be set directly on the struct
Diffstat (limited to 'hiredis.h')
-rw-r--r-- | hiredis.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -134,14 +134,14 @@ typedef struct redisReader { void freeReplyObject(void *reply); redisReader *redisReplyReaderCreate(void); int redisReplyReaderSetReplyObjectFunctions(redisReader *r, redisReplyObjectFunctions *fn); -int redisReplyReaderSetPrivdata(redisReader *r, void *privdata); void redisReplyReaderFree(redisReader *r); void redisReplyReaderFeed(redisReader *r, const char *buf, size_t len); int redisReplyReaderGetReply(redisReader *r, void **reply); /* Backwards compatibility, can be removed on big version bump. */ -#define redisReplyReaderGetObject(_r) (((redisReader*)(r))->reply) -#define redisReplyReaderGetError(_r) (((redisReader*)(r))->errstr) +#define redisReplyReaderSetPrivdata(_r, _p) (int)(((redisReader*)(_r))->privdata = (_p)) +#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); |