From 86e1b3f45f57358d6b2a6666043df9a4a2f963c5 Mon Sep 17 00:00:00 2001 From: "E. Westbrook" Date: Wed, 27 Feb 2019 21:01:06 -0700 Subject: [PATCH] tcp: pragma visibility --- src/tcp.c | 7 +------ src/tcp.h | 6 +++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/tcp.c b/src/tcp.c index cc5b6a7..5876bfb 100644 --- a/src/tcp.c +++ b/src/tcp.c @@ -4,12 +4,7 @@ \*=========================================================================*/ #include "luasocket.h" -#include "lua.h" -#include "lauxlib.h" - -#include "compat.h" #include "auxiliar.h" - #include "socket.h" #include "inet.h" #include "options.h" @@ -129,7 +124,7 @@ static luaL_Reg func[] = { /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ -LUASOCKET_PRIVATE int tcp_open(lua_State *L) +int tcp_open(lua_State *L) { /* create classes */ auxiliar_newclass(L, "tcp{master}", tcp_methods); diff --git a/src/tcp.h b/src/tcp.h index eded620..9b12b53 100644 --- a/src/tcp.h +++ b/src/tcp.h @@ -14,7 +14,7 @@ * tcp objects either connected to some address or returned by the accept * method of a server object. \*=========================================================================*/ -#include "lua.h" +#include "luasocket.h" #include "buffer.h" #include "timeout.h" @@ -30,6 +30,10 @@ typedef struct t_tcp_ { typedef t_tcp *p_tcp; +#pragma GCC visibility push(hidden) + int tcp_open(lua_State *L); +#pragma GCC visibility pop + #endif /* TCP_H */