Change prototype of async reply callback
This commit is contained in:
parent
4b530833c6
commit
b673f0cfb3
2
async.h
2
async.h
@ -34,7 +34,7 @@
|
|||||||
struct redisAsyncContext; /* need forward declaration of redisAsyncContext */
|
struct redisAsyncContext; /* need forward declaration of redisAsyncContext */
|
||||||
|
|
||||||
/* Reply callback prototype and container */
|
/* Reply callback prototype and container */
|
||||||
typedef void (redisCallbackFn)(struct redisAsyncContext*, redisReply*, void*);
|
typedef void (redisCallbackFn)(struct redisAsyncContext*, void*, void*);
|
||||||
typedef struct redisCallback {
|
typedef struct redisCallback {
|
||||||
struct redisCallback *next; /* simple singly linked list */
|
struct redisCallback *next; /* simple singly linked list */
|
||||||
redisCallbackFn *fn;
|
redisCallbackFn *fn;
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
#include "async.h"
|
#include "async.h"
|
||||||
#include "adapters/libev.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;
|
if (reply == NULL) return;
|
||||||
printf("argv[%s]: %s\n", (char*)privdata, reply->str);
|
printf("argv[%s]: %s\n", (char*)privdata, reply->str);
|
||||||
|
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
#include "async.h"
|
#include "async.h"
|
||||||
#include "adapters/libevent.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;
|
if (reply == NULL) return;
|
||||||
printf("argv[%s]: %s\n", (char*)privdata, reply->str);
|
printf("argv[%s]: %s\n", (char*)privdata, reply->str);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user