summaryrefslogtreecommitdiff
path: root/adapters/libev.h
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-12-29 15:41:03 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-12-29 15:41:03 +0100
commit18c55a8f1e93aaa4df6c970333ad3d691e3438b0 (patch)
treea6482fb7cfd2494394865325d84d91de01a163da /adapters/libev.h
parent8cb4d52cd273d6134f881c232a307c3259af334a (diff)
Scope event library related data and hooks to a struct
Diffstat (limited to 'adapters/libev.h')
-rw-r--r--adapters/libev.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/adapters/libev.h b/adapters/libev.h
index 3b9ed65..7b2b6af 100644
--- a/adapters/libev.h
+++ b/adapters/libev.h
@@ -82,7 +82,7 @@ int redisLibevAttach(EV_P_ redisAsyncContext *ac) {
redisLibevEvents *e;
/* Nothing should be attached when something is already attached */
- if (ac->_adapter_data != NULL)
+ if (ac->ev.data != NULL)
return REDIS_ERR;
/* Create container for context and r/w events */
@@ -98,12 +98,12 @@ int redisLibevAttach(EV_P_ redisAsyncContext *ac) {
e->wev.data = e;
/* Register functions to start/stop listening for events */
- ac->evAddRead = redisLibevAddRead;
- ac->evDelRead = redisLibevDelRead;
- ac->evAddWrite = redisLibevAddWrite;
- ac->evDelWrite = redisLibevDelWrite;
- ac->evCleanup = redisLibevCleanup;
- ac->_adapter_data = e;
+ ac->ev.addRead = redisLibevAddRead;
+ ac->ev.delRead = redisLibevDelRead;
+ ac->ev.addWrite = redisLibevAddWrite;
+ ac->ev.delWrite = redisLibevDelWrite;
+ ac->ev.cleanup = redisLibevCleanup;
+ ac->ev.data = e;
/* Initialize read/write events */
ev_io_init(&e->rev,redisLibevReadEvent,c->fd,EV_READ);