Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
b673f0cf
Commit
b673f0cf
authored
Nov 01, 2010
by
Pieter Noordhuis
Browse files
Change prototype of async reply callback
parent
4b530833
Changes
3
Hide whitespace changes
Inline
Side-by-side
async.h
View file @
b673f0cf
...
...
@@ -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
;
...
...
example-libev.c
View file @
b673f0cf
...
...
@@ -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
);
...
...
example-libevent.c
View file @
b673f0cf
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment