about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2016-05-26 00:27:08 -0400
committerFedor Indutny <fedor@indutny.com>2016-05-26 00:27:08 -0400
commit5649bb2eeffbd6b7b074e63cf72ae064b10fcd0d (patch)
tree8101ec65a3b11a0492b6a4c26fbd492e24b05bb3
parent9b0a792a84b8c6fca6f94c740061bdd46b502290 (diff)
downloaduv_link_t-5649bb2eeffbd6b7b074e63cf72ae064b10fcd0d.tar.gz
src: shuffle files around
-rw-r--r--include/uv_link_t.h (renamed from include/uv_link.h)5
-rw-r--r--src/common.h2
-rw-r--r--src/uv_link_source_t.c (renamed from src/uv_link_source.c)7
-rw-r--r--src/uv_link_t.c (renamed from src/uv_link.c)6
-rw-r--r--test/src/test-common.h2
-rw-r--r--test/src/test-uv-link-source-t.c1
-rw-r--r--uv_link_t.gyp4
7 files changed, 15 insertions, 12 deletions
diff --git a/include/uv_link.h b/include/uv_link_t.h
index f835fd2..45a179c 100644
--- a/include/uv_link.h
+++ b/include/uv_link_t.h
@@ -6,7 +6,6 @@
 typedef struct uv_link_s uv_link_t;
 typedef struct uv_link_source_s uv_link_source_t;
 
-typedef void (*uv_link_close_cb)(uv_link_t* link);
 typedef void (*uv_link_alloc_cb)(uv_link_t* link,
                                  size_t suggested_size,
                                  uv_buf_t* buf);
@@ -46,7 +45,7 @@ struct uv_link_source_s {
 };
 
 UV_EXTERN int uv_link_init(uv_loop_t* loop, uv_link_t* link);
-UV_EXTERN int uv_link_close(uv_link_t* link, uv_link_close_cb close_cb);
+UV_EXTERN void uv_link_close(uv_link_t* link);
 
 UV_EXTERN int uv_link_chain(uv_link_t* from, uv_link_t* to);
 UV_EXTERN int uv_link_unchain(uv_link_t* from, uv_link_t* to);
@@ -57,6 +56,6 @@ UV_EXTERN int uv_link_unchain(uv_link_t* from, uv_link_t* to);
 UV_EXTERN int uv_link_source_init(uv_loop_t* loop,
                                   uv_link_source_t* source,
                                   uv_stream_t* stream);
-UV_EXTERN int uv_link_source_destroy(uv_link_source_t* source);
+UV_EXTERN void uv_link_source_close(uv_link_source_t* source);
 
 #endif  /* INCLUDE_UV_LINK_H_ */
diff --git a/src/common.h b/src/common.h
index 8c5725d..6d19477 100644
--- a/src/common.h
+++ b/src/common.h
@@ -1,6 +1,8 @@
 #ifndef SRC_COMMON_H_
 #define SRC_COMMON_H_
 
+#include "uv_link_t.h"
+
 #define container_of(ptr, type, member) \
   ((type *) ((char *) (ptr) - offsetof(type, member)))
 
diff --git a/src/uv_link_source.c b/src/uv_link_source_t.c
index 181a060..c58e8ec 100644
--- a/src/uv_link_source.c
+++ b/src/uv_link_source_t.c
@@ -1,7 +1,5 @@
 #include <stdlib.h>
 
-#include "uv_link.h"
-
 #include "common.h"
 
 typedef struct uv_link_source_write_s uv_link_source_write_t;
@@ -154,7 +152,8 @@ int uv_link_source_init(uv_loop_t* loop,
 }
 
 
-int uv_link_source_destroy(uv_link_source_t* source) {
+void uv_link_source_close(uv_link_source_t* source) {
+  uv_link_close(&source->link);
+
   source->stream = NULL;
-  return 0;
 }
diff --git a/src/uv_link.c b/src/uv_link_t.c
index e4199cf..891640c 100644
--- a/src/uv_link.c
+++ b/src/uv_link_t.c
@@ -1,10 +1,12 @@
 #include <string.h>
 
-#include "uv_link.h"
-
 #include "common.h"
 
 int uv_link_init(uv_loop_t* loop, uv_link_t* link) {
   memset(link, 0, sizeof(*link));
   return 0;
 }
+
+
+void uv_link_close(uv_link_t* link) {
+}
diff --git a/test/src/test-common.h b/test/src/test-common.h
index 10e40a2..1a3e79d 100644
--- a/test/src/test-common.h
+++ b/test/src/test-common.h
@@ -6,7 +6,7 @@
 #include <errno.h>
 
 #include "uv.h"
-#include "uv_link.h"
+#include "uv_link_t.h"
 
 #include "test-list.h"
 
diff --git a/test/src/test-uv-link-source-t.c b/test/src/test-uv-link-source-t.c
index a1d91df..64ab200 100644
--- a/test/src/test-uv-link-source-t.c
+++ b/test/src/test-uv-link-source-t.c
@@ -114,6 +114,7 @@ TEST_IMPL(uv_link_source_t) {
   test_writes();
   test_reads();
 
+  uv_link_source_close(&source);
   uv_close((uv_handle_t*) &pair_right, NULL);
 
   CHECK_EQ(close(fds[0]), 0, "close(fds[0])");
diff --git a/uv_link_t.gyp b/uv_link_t.gyp
index 6b00b43..7e881e0 100644
--- a/uv_link_t.gyp
+++ b/uv_link_t.gyp
@@ -15,8 +15,8 @@
     ],
 
     "sources": [
-      "src/uv_link.c",
-      "src/uv_link_source.c",
+      "src/uv_link_t.c",
+      "src/uv_link_source_t.c",
     ],
   }],
 }
0 04:22:17 -0400 renamed files for clarity' href='/gbmor/getwtxt/commit/handlers.go?h=v0.1.1&id=1168570b071d8bb483e4028f3a8c45a222c93ecb'>1168570 ^
505c5d8 ^
f4eb1c7 ^
1168570 ^








df1d1ef ^
1168570 ^




dec003b ^




1168570 ^
dec003b ^


1168570 ^
dec003b ^
f4eb1c7 ^
1168570 ^












37be25f ^
37bf8b0 ^
37be25f ^




37bf8b0 ^
1168570 ^



37be25f ^
37bf8b0 ^
37be25f ^






37bf8b0 ^
1168570 ^
















1168570 ^
2b0d4a5 ^
1168570 ^



2b0d4a5 ^


1168570 ^






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192