diff options
author | E. Westbrook <github@westbrook.io> | 2019-02-27 20:57:14 -0700 |
---|---|---|
committer | E. Westbrook <github@westbrook.io> | 2019-03-10 00:03:04 -0700 |
commit | 611cdd19cc8cf783f028d558cf23e9397db4fa1f (patch) | |
tree | d571734ff0d62a43d7a5eed609c6a0d615f90048 /src/inet.h | |
parent | 4bf3eb6db2315fef8f3d18c8ce742752f7e4fda2 (diff) | |
download | luasocket-611cdd19cc8cf783f028d558cf23e9397db4fa1f.tar.gz luasocket-611cdd19cc8cf783f028d558cf23e9397db4fa1f.tar.bz2 luasocket-611cdd19cc8cf783f028d558cf23e9397db4fa1f.zip |
inet: pragma visibility
Diffstat (limited to '')
-rw-r--r-- | src/inet.h | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -14,7 +14,7 @@ | |||
14 | * | 14 | * |
15 | * The Lua functions toip and tohostname are also implemented here. | 15 | * The Lua functions toip and tohostname are also implemented here. |
16 | \*=========================================================================*/ | 16 | \*=========================================================================*/ |
17 | #include "lua.h" | 17 | #include "luasocket.h" |
18 | #include "socket.h" | 18 | #include "socket.h" |
19 | #include "timeout.h" | 19 | #include "timeout.h" |
20 | 20 | ||
@@ -22,21 +22,21 @@ | |||
22 | #define LUASOCKET_INET_ATON | 22 | #define LUASOCKET_INET_ATON |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #pragma GCC visibility push(hidden) | ||
26 | |||
25 | int inet_open(lua_State *L); | 27 | int inet_open(lua_State *L); |
26 | 28 | ||
27 | const char *inet_trycreate(p_socket ps, int family, int type, int protocol); | 29 | int inet_optfamily(lua_State* L, int narg, const char* def); |
28 | const char *inet_tryconnect(p_socket ps, int *family, const char *address, | 30 | int inet_optsocktype(lua_State* L, int narg, const char* def); |
29 | const char *serv, p_timeout tm, struct addrinfo *connecthints); | ||
30 | const char *inet_trybind(p_socket ps, int *family, const char *address, | ||
31 | const char *serv, struct addrinfo *bindhints); | ||
32 | const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm); | ||
33 | const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm); | ||
34 | 31 | ||
35 | int inet_meth_getpeername(lua_State *L, p_socket ps, int family); | 32 | int inet_meth_getpeername(lua_State *L, p_socket ps, int family); |
36 | int inet_meth_getsockname(lua_State *L, p_socket ps, int family); | 33 | int inet_meth_getsockname(lua_State *L, p_socket ps, int family); |
37 | 34 | ||
38 | int inet_optfamily(lua_State* L, int narg, const char* def); | 35 | const char *inet_trycreate(p_socket ps, int family, int type, int protocol); |
39 | int inet_optsocktype(lua_State* L, int narg, const char* def); | 36 | const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm); |
37 | const char *inet_tryconnect(p_socket ps, int *family, const char *address, const char *serv, p_timeout tm, struct addrinfo *connecthints); | ||
38 | const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm); | ||
39 | const char *inet_trybind(p_socket ps, int *family, const char *address, const char *serv, struct addrinfo *bindhints); | ||
40 | 40 | ||
41 | #ifdef LUASOCKET_INET_ATON | 41 | #ifdef LUASOCKET_INET_ATON |
42 | int inet_aton(const char *cp, struct in_addr *inp); | 42 | int inet_aton(const char *cp, struct in_addr *inp); |
@@ -47,4 +47,6 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); | |||
47 | int inet_pton(int af, const char *src, void *dst); | 47 | int inet_pton(int af, const char *src, void *dst); |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #pragma GCC visibility pop | ||
51 | |||
50 | #endif /* INET_H */ | 52 | #endif /* INET_H */ |