From ee30e4643d276c82775010534cb4877a31bde2f9 Mon Sep 17 00:00:00 2001 From: "E. Westbrook" Date: Wed, 27 Feb 2019 20:57:25 -0700 Subject: [PATCH] io: pragma visibility --- src/io.c | 7 ++----- src/io.h | 8 +++++--- 2 files changed, 7 insertions(+), 8 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 @@ #include "luasocket.h" #include "io.h" -/*=========================================================================*\ -* Exported functions -\*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Initializes C structure \*-------------------------------------------------------------------------*/ -LUASOCKET_PRIVATE void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { +void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { io->send = send; io->recv = recv; io->error = error; @@ -21,7 +18,7 @@ LUASOCKET_PRIVATE void io_init(p_io io, p_send send, p_recv recv, p_error error, /*-------------------------------------------------------------------------*\ * I/O error strings \*-------------------------------------------------------------------------*/ -LUASOCKET_PRIVATE const char *io_strerror(int err) { +const char *io_strerror(int err) { switch (err) { case IO_DONE: return NULL; case IO_CLOSED: return "closed"; diff --git a/src/io.h b/src/io.h index 8cca08a..e08eb0e 100644 --- a/src/io.h +++ b/src/io.h @@ -12,9 +12,7 @@ * The module socket.h implements this interface, and thus the module tcp.h * is very simple. \*=========================================================================*/ -#include -#include "lua.h" - +#include "luasocket.h" #include "timeout.h" /* IO error codes */ @@ -58,8 +56,12 @@ typedef struct t_io_ { } t_io; typedef t_io *p_io; +#pragma GCC visibility push(hidden) + void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx); const char *io_strerror(int err); +#pragma GCC visibility pop + #endif /* IO_H */