about summary refs log tree commit diff stats
path: root/example/src/main.c
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2016-05-27 23:50:46 -0400
committerFedor Indutny <fedor@indutny.com>2016-05-27 23:50:46 -0400
commitd4069cc59b0c9d4ce00977a9268f90e306f1cdf8 (patch)
treeb4d35fb43555503db6566de9d0cf1cd71d6497f1 /example/src/main.c
parent6a1f2335d96dfaf95a4423b94c36df389e3d4ec2 (diff)
downloaduv_link_t-d4069cc59b0c9d4ce00977a9268f90e306f1cdf8.tar.gz
api: inherit structs from uv_link_t
Diffstat (limited to 'example/src/main.c')
-rw-r--r--example/src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/example/src/main.c b/example/src/main.c
index 5c847ec..215a35a 100644
--- a/example/src/main.c
+++ b/example/src/main.c
@@ -34,7 +34,7 @@ static void read_cb(uv_link_observer_t* observer,
                     const uv_buf_t* buf) {
   client_t* client;
 
-  client = observer->link.data;
+  client = observer->data;
 
   if (nread < 0) {
     fprintf(stderr, "error or close\n");
@@ -56,14 +56,14 @@ static void connection_cb(uv_stream_t* s, int status) {
 
   CHECK(uv_link_source_init(&client->source, (uv_stream_t*) &client->tcp));
   CHECK(uv_link_init(&client->middle, &middle_methods));
-  CHECK(uv_link_chain(&client->source.link, &client->middle));
+  CHECK(uv_link_chain((uv_link_t*) &client->source, &client->middle));
   CHECK(uv_link_observer_init(&client->observer));
-  CHECK(uv_link_chain(&client->middle, &client->observer.link));
+  CHECK(uv_link_chain(&client->middle, (uv_link_t*) &client->observer));
 
   client->observer.read_cb = read_cb;
-  client->observer.link.data = client;
+  client->observer.data = client;
 
-  CHECK(uv_link_read_start(&client->observer.link));
+  CHECK(uv_link_read_start((uv_link_t*) &client->observer));
 }