diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-12-16 23:32:02 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-12-23 11:01:11 +0000 |
commit | a1e97d692e3b9ed3cd6c8751a70665d832199fff (patch) | |
tree | 9ea6957a2c0131f4e75feee38e5bcfdbd2666ff0 /deps/hiredis/adapters/libevent.h | |
parent | d3e5e28804bd3cfd038d95a1ffd85a92941bc788 (diff) | |
download | redis-a1e97d692e3b9ed3cd6c8751a70665d832199fff.tar.gz |
Update hiredis to 0.9.2
Diffstat (limited to 'deps/hiredis/adapters/libevent.h')
-rw-r--r-- | deps/hiredis/adapters/libevent.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/deps/hiredis/adapters/libevent.h b/deps/hiredis/adapters/libevent.h index 1b759c131..dc1f5c739 100644 --- a/deps/hiredis/adapters/libevent.h +++ b/deps/hiredis/adapters/libevent.h @@ -10,38 +10,38 @@ typedef struct redisLibeventEvents { void redisLibeventReadEvent(int fd, short event, void *arg) { ((void)fd); ((void)event); - redisLibeventEvents *e = arg; + redisLibeventEvents *e = (redisLibeventEvents*)arg; redisAsyncHandleRead(e->context); } void redisLibeventWriteEvent(int fd, short event, void *arg) { ((void)fd); ((void)event); - redisLibeventEvents *e = arg; + redisLibeventEvents *e = (redisLibeventEvents*)arg; redisAsyncHandleWrite(e->context); } void redisLibeventAddRead(void *privdata) { - redisLibeventEvents *e = privdata; + redisLibeventEvents *e = (redisLibeventEvents*)privdata; event_add(&e->rev,NULL); } void redisLibeventDelRead(void *privdata) { - redisLibeventEvents *e = privdata; + redisLibeventEvents *e = (redisLibeventEvents*)privdata; event_del(&e->rev); } void redisLibeventAddWrite(void *privdata) { - redisLibeventEvents *e = privdata; + redisLibeventEvents *e = (redisLibeventEvents*)privdata; event_add(&e->wev,NULL); } void redisLibeventDelWrite(void *privdata) { - redisLibeventEvents *e = privdata; + redisLibeventEvents *e = (redisLibeventEvents*)privdata; event_del(&e->wev); } void redisLibeventCleanup(void *privdata) { - redisLibeventEvents *e = privdata; + redisLibeventEvents *e = (redisLibeventEvents*)privdata; event_del(&e->rev); event_del(&e->wev); free(e); @@ -52,11 +52,11 @@ int redisLibeventAttach(redisAsyncContext *ac, struct event_base *base) { redisLibeventEvents *e; /* Nothing should be attached when something is already attached */ - if (ac->data != NULL) + if (ac->_adapter_data != NULL) return REDIS_ERR; /* Create container for context and r/w events */ - e = malloc(sizeof(*e)); + e = (redisLibeventEvents*)malloc(sizeof(*e)); e->context = ac; /* Register functions to start/stop listening for events */ @@ -65,7 +65,7 @@ int redisLibeventAttach(redisAsyncContext *ac, struct event_base *base) { ac->evAddWrite = redisLibeventAddWrite; ac->evDelWrite = redisLibeventDelWrite; ac->evCleanup = redisLibeventCleanup; - ac->data = e; + ac->_adapter_data = e; /* Initialize and install read/write events */ event_set(&e->rev,c->fd,EV_READ,redisLibeventReadEvent,e); |