From 5ba49014da410b3e671c341469ac372d6a383822 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Thu, 21 Apr 2011 14:34:03 +0200 Subject: Privdata can be set directly on the struct --- hiredis.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hiredis.h') diff --git a/hiredis.h b/hiredis.h index 6a2257f..55342a3 100644 --- a/hiredis.h +++ b/hiredis.h @@ -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); -- cgit v1.2.3