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
f20f5ad1
Commit
f20f5ad1
authored
Sep 10, 2013
by
John Graham
Committed by
Matt Stancliff
Apr 09, 2014
Browse files
Libuv: Fix compile warnings and C++ compatability
Closes #189
parent
303a0421
Changes
1
Hide whitespace changes
Inline
Side-by-side
adapters/libuv.h
View file @
f20f5ad1
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <uv.h>
#include <uv.h>
#include "../hiredis.h"
#include "../hiredis.h"
#include "../async.h"
#include "../async.h"
#include <string.h>
typedef
struct
redisLibuvEvents
{
typedef
struct
redisLibuvEvents
{
redisAsyncContext
*
context
;
redisAsyncContext
*
context
;
...
@@ -11,6 +11,7 @@ typedef struct redisLibuvEvents {
...
@@ -11,6 +11,7 @@ typedef struct redisLibuvEvents {
int
events
;
int
events
;
}
redisLibuvEvents
;
}
redisLibuvEvents
;
int
redisLibuvAttach
(
redisAsyncContext
*
,
uv_loop_t
*
);
static
void
redisLibuvPoll
(
uv_poll_t
*
handle
,
int
status
,
int
events
)
{
static
void
redisLibuvPoll
(
uv_poll_t
*
handle
,
int
status
,
int
events
)
{
redisLibuvEvents
*
p
=
(
redisLibuvEvents
*
)
handle
->
data
;
redisLibuvEvents
*
p
=
(
redisLibuvEvents
*
)
handle
->
data
;
...
@@ -99,7 +100,7 @@ int redisLibuvAttach(redisAsyncContext* ac, uv_loop_t* loop) {
...
@@ -99,7 +100,7 @@ int redisLibuvAttach(redisAsyncContext* ac, uv_loop_t* loop) {
ac
->
ev
.
delWrite
=
redisLibuvDelWrite
;
ac
->
ev
.
delWrite
=
redisLibuvDelWrite
;
ac
->
ev
.
cleanup
=
redisLibuvCleanup
;
ac
->
ev
.
cleanup
=
redisLibuvCleanup
;
redisLibuvEvents
*
p
=
malloc
(
sizeof
(
*
p
));
redisLibuvEvents
*
p
=
(
redisLibuvEvents
*
)
malloc
(
sizeof
(
*
p
));
if
(
!
p
)
{
if
(
!
p
)
{
return
REDIS_ERR
;
return
REDIS_ERR
;
...
...
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