aboutsummaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
authorDiego Nehab <diego.nehab@gmail.com>2019-03-11 00:08:41 -0300
committerGitHub <noreply@github.com>2019-03-11 00:08:41 -0300
commitc89a931cc31f219d51dd32a8a253d5ee3fbd31be (patch)
tree1fc604d7cbd6a42c801b92b145651d91c458dfa2 /src/io.c
parent2af4872a401cbd0c1255e19ee26620f0431dd9f5 (diff)
parent21514304be9e98a4386cb18542582068a59c5586 (diff)
downloadluasocket-c89a931cc31f219d51dd32a8a253d5ee3fbd31be.tar.gz
luasocket-c89a931cc31f219d51dd32a8a253d5ee3fbd31be.tar.bz2
luasocket-c89a931cc31f219d51dd32a8a253d5ee3fbd31be.zip
Merge pull request #271 from ewestbrook/pragmavisibility
Use visibility pragma around declarations instead of attributes on definitions
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/io.c b/src/io.c
index f1a2b9d..5ad4b3a 100644
--- a/src/io.c
+++ b/src/io.c
@@ -5,13 +5,10 @@
5#include "luasocket.h" 5#include "luasocket.h"
6#include "io.h" 6#include "io.h"
7 7
8/*=========================================================================*\
9* Exported functions
10\*=========================================================================*/
11/*-------------------------------------------------------------------------*\ 8/*-------------------------------------------------------------------------*\
12* Initializes C structure 9* Initializes C structure
13\*-------------------------------------------------------------------------*/ 10\*-------------------------------------------------------------------------*/
14LUASOCKET_PRIVATE void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { 11void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) {
15 io->send = send; 12 io->send = send;
16 io->recv = recv; 13 io->recv = recv;
17 io->error = error; 14 io->error = error;
@@ -21,7 +18,7 @@ LUASOCKET_PRIVATE void io_init(p_io io, p_send send, p_recv recv, p_error error,
21/*-------------------------------------------------------------------------*\ 18/*-------------------------------------------------------------------------*\
22* I/O error strings 19* I/O error strings
23\*-------------------------------------------------------------------------*/ 20\*-------------------------------------------------------------------------*/
24LUASOCKET_PRIVATE const char *io_strerror(int err) { 21const char *io_strerror(int err) {
25 switch (err) { 22 switch (err) {
26 case IO_DONE: return NULL; 23 case IO_DONE: return NULL;
27 case IO_CLOSED: return "closed"; 24 case IO_CLOSED: return "closed";