From b673f0cfb375240091178f8b39ea0a6b16ea91fc Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 1 Nov 2010 13:21:26 +0100 Subject: [PATCH] Change prototype of async reply callback --- async.h | 2 +- example-libev.c | 3 ++- example-libevent.c | 3 ++- 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);