summaryrefslogtreecommitdiff
path: root/adapters/libev.h
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-12-01 16:43:21 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-12-01 16:43:24 +0100
commitaf7369a253247e23f699a0d803f68b3ade022044 (patch)
treeaf3aae5b9667cd9b1008f3cd2d6c4389c561aa5e /adapters/libev.h
parent9af1574d6e65bac7b39e7036056cb326064f1ac4 (diff)
Use extra field for adapter-specific data
This makes sure that the "data" field on the asynchronous context can be used for user-specific data.
Diffstat (limited to 'adapters/libev.h')
-rw-r--r--adapters/libev.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/adapters/libev.h b/adapters/libev.h
index 8a2a4f3..3b9ed65 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->data != NULL)
+ if (ac->_adapter_data != NULL)
return REDIS_ERR;
/* Create container for context and r/w events */
@@ -103,7 +103,7 @@ int redisLibevAttach(EV_P_ redisAsyncContext *ac) {
ac->evAddWrite = redisLibevAddWrite;
ac->evDelWrite = redisLibevDelWrite;
ac->evCleanup = redisLibevCleanup;
- ac->data = e;
+ ac->_adapter_data = e;
/* Initialize read/write events */
ev_io_init(&e->rev,redisLibevReadEvent,c->fd,EV_READ);