diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/io.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2,6 +2,7 @@ | |||
2 | * Input/Output abstraction | 2 | * Input/Output abstraction |
3 | * LuaSocket toolkit | 3 | * LuaSocket toolkit |
4 | \*=========================================================================*/ | 4 | \*=========================================================================*/ |
5 | #include "luasocket.h" | ||
5 | #include "io.h" | 6 | #include "io.h" |
6 | 7 | ||
7 | /*=========================================================================*\ | 8 | /*=========================================================================*\ |
@@ -10,7 +11,7 @@ | |||
10 | /*-------------------------------------------------------------------------*\ | 11 | /*-------------------------------------------------------------------------*\ |
11 | * Initializes C structure | 12 | * Initializes C structure |
12 | \*-------------------------------------------------------------------------*/ | 13 | \*-------------------------------------------------------------------------*/ |
13 | void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { | 14 | LUASOCKET_PRIVATE void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { |
14 | io->send = send; | 15 | io->send = send; |
15 | io->recv = recv; | 16 | io->recv = recv; |
16 | io->error = error; | 17 | io->error = error; |
@@ -20,7 +21,7 @@ void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { | |||
20 | /*-------------------------------------------------------------------------*\ | 21 | /*-------------------------------------------------------------------------*\ |
21 | * I/O error strings | 22 | * I/O error strings |
22 | \*-------------------------------------------------------------------------*/ | 23 | \*-------------------------------------------------------------------------*/ |
23 | const char *io_strerror(int err) { | 24 | LUASOCKET_PRIVATE const char *io_strerror(int err) { |
24 | switch (err) { | 25 | switch (err) { |
25 | case IO_DONE: return NULL; | 26 | case IO_DONE: return NULL; |
26 | case IO_CLOSED: return "closed"; | 27 | case IO_CLOSED: return "closed"; |