summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-24 12:27:44 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-24 12:27:46 +0100
commit1927c643da500f4155f2a11b7595d9006ada70e9 (patch)
treeef6a1337e04662e5278c2520b3eed6bc3682684c /hiredis.h
parentfb49cd19887e45e1118b9a3b09f582305c842e4b (diff)
Add privdata field to reply reader
This field is set in the read tasks that are passed to the reply object functions. This allows to curry arbitrary data to these functions.
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/hiredis.h b/hiredis.h
index 21098cc..5065043 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -88,6 +88,7 @@ typedef struct redisReadTask {
int elements; /* number of elements in multibulk container */
void *parent; /* optional pointer to parent object */
int idx; /* index in parent (array) object */
+ void *privdata; /* user-settable arbitrary field */
} redisReadTask;
typedef struct redisReplyObjectFunctions {
@@ -116,6 +117,7 @@ typedef struct redisContext {
void freeReplyObject(void *reply);
void *redisReplyReaderCreate();
int redisReplyReaderSetReplyObjectFunctions(void *reader, redisReplyObjectFunctions *fn);
+int redisReplyReaderSetPrivdata(void *reader, void *privdata);
void *redisReplyReaderGetObject(void *reader);
char *redisReplyReaderGetError(void *reader);
void redisReplyReaderFree(void *ptr);