diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-11-01 13:21:26 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-11-01 13:21:26 +0100 |
commit | b673f0cfb375240091178f8b39ea0a6b16ea91fc (patch) | |
tree | d01eea5a2f3f4e9422b9624dff6caed532f39648 | |
parent | 4b530833c6fc872aa33f7113637b85381d11d446 (diff) |
Change prototype of async reply callback
-rw-r--r-- | async.h | 2 | ||||
-rw-r--r-- | example-libev.c | 3 | ||||
-rw-r--r-- | example-libevent.c | 3 |
3 files changed, 5 insertions, 3 deletions
@@ -34,7 +34,7 @@ struct redisAsyncContext; /* need forward declaration of redisAsyncContext */ /* Reply callback prototype and container */ -typedef void (redisCallbackFn)(struct redisAsyncContext*, redisReply*, void*); +typedef void (redisCallbackFn)(struct redisAsyncContext*, void*, void*); typedef struct redisCallback { struct redisCallback *next; /* simple singly linked list */ redisCallbackFn *fn; diff --git a/example-libev.c b/example-libev.c index 709c9ea..f17fe4e 100644 --- a/example-libev.c +++ b/example-libev.c @@ -6,7 +6,8 @@ #include "async.h" #include "adapters/libev.h" -void getCallback(redisAsyncContext *c, redisReply *reply, void *privdata) { +void getCallback(redisAsyncContext *c, void *r, void *privdata) { + redisReply *reply = r; if (reply == NULL) return; printf("argv[%s]: %s\n", (char*)privdata, reply->str); diff --git a/example-libevent.c b/example-libevent.c index 65dffe6..8be78a1 100644 --- a/example-libevent.c +++ b/example-libevent.c @@ -6,7 +6,8 @@ #include "async.h" #include "adapters/libevent.h" -void getCallback(redisAsyncContext *c, redisReply *reply, void *privdata) { +void getCallback(redisAsyncContext *c, void *r, void *privdata) { + redisReply *reply = r; if (reply == NULL) return; printf("argv[%s]: %s\n", (char*)privdata, reply->str); |