mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 12:28:21 +01:00
io.c: use LUASOCKET_PRIVATE
This commit is contained in:
parent
731b23bc89
commit
3f19a052e8
5
src/io.c
5
src/io.c
@ -2,6 +2,7 @@
|
|||||||
* Input/Output abstraction
|
* Input/Output abstraction
|
||||||
* LuaSocket toolkit
|
* LuaSocket toolkit
|
||||||
\*=========================================================================*/
|
\*=========================================================================*/
|
||||||
|
#include "luasocket.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
|
|
||||||
/*=========================================================================*\
|
/*=========================================================================*\
|
||||||
@ -10,7 +11,7 @@
|
|||||||
/*-------------------------------------------------------------------------*\
|
/*-------------------------------------------------------------------------*\
|
||||||
* Initializes C structure
|
* Initializes C structure
|
||||||
\*-------------------------------------------------------------------------*/
|
\*-------------------------------------------------------------------------*/
|
||||||
void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) {
|
LUASOCKET_PRIVATE void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) {
|
||||||
io->send = send;
|
io->send = send;
|
||||||
io->recv = recv;
|
io->recv = recv;
|
||||||
io->error = error;
|
io->error = error;
|
||||||
@ -20,7 +21,7 @@ void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) {
|
|||||||
/*-------------------------------------------------------------------------*\
|
/*-------------------------------------------------------------------------*\
|
||||||
* I/O error strings
|
* I/O error strings
|
||||||
\*-------------------------------------------------------------------------*/
|
\*-------------------------------------------------------------------------*/
|
||||||
const char *io_strerror(int err) {
|
LUASOCKET_PRIVATE const char *io_strerror(int err) {
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case IO_DONE: return NULL;
|
case IO_DONE: return NULL;
|
||||||
case IO_CLOSED: return "closed";
|
case IO_CLOSED: return "closed";
|
||||||
|
Loading…
Reference in New Issue
Block a user