summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-01 13:21:26 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-01 13:21:26 +0100
commitb673f0cfb375240091178f8b39ea0a6b16ea91fc (patch)
treed01eea5a2f3f4e9422b9624dff6caed532f39648
parent4b530833c6fc872aa33f7113637b85381d11d446 (diff)
Change prototype of async reply callback
-rw-r--r--async.h2
-rw-r--r--example-libev.c3
-rw-r--r--example-libevent.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/async.h b/async.h
index 3f29c10..2e14b13 100644
--- a/async.h
+++ b/async.h
@@ -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);