mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 14:28:21 +01:00
io: pragma visibility
This commit is contained in:
parent
611cdd19cc
commit
ee30e4643d
7
src/io.c
7
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";
|
||||
|
8
src/io.h
8
src/io.h
@ -12,9 +12,7 @@
|
||||
* The module socket.h implements this interface, and thus the module tcp.h
|
||||
* is very simple.
|
||||
\*=========================================================================*/
|
||||
#include <stdio.h>
|
||||
#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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user