58 lines
2.2 KiB
Plaintext
58 lines
2.2 KiB
Plaintext
$OpenBSD: patch-src_unix_c,v 1.2 2013/11/25 15:27:56 dcoppa Exp $
|
|
--- src/unix.c.orig Fri Nov 15 10:56:41 2013
|
|
+++ src/unix.c Fri Nov 15 10:57:41 2013
|
|
@@ -109,22 +109,22 @@ int luaopen_socket_unix(lua_State *L) {
|
|
\*-------------------------------------------------------------------------*/
|
|
static int meth_send(lua_State *L) {
|
|
p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
|
|
- return buffer_meth_send(L, &un->buf);
|
|
+ return ls_buffer_meth_send(L, &un->buf);
|
|
}
|
|
|
|
static int meth_receive(lua_State *L) {
|
|
p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
|
|
- return buffer_meth_receive(L, &un->buf);
|
|
+ return ls_buffer_meth_receive(L, &un->buf);
|
|
}
|
|
|
|
static int meth_getstats(lua_State *L) {
|
|
p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
|
|
- return buffer_meth_getstats(L, &un->buf);
|
|
+ return ls_buffer_meth_getstats(L, &un->buf);
|
|
}
|
|
|
|
static int meth_setstats(lua_State *L) {
|
|
p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
|
|
- return buffer_meth_setstats(L, &un->buf);
|
|
+ return ls_buffer_meth_setstats(L, &un->buf);
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*\
|
|
@@ -153,7 +153,7 @@ static int meth_setfd(lua_State *L) {
|
|
|
|
static int meth_dirty(lua_State *L) {
|
|
p_unix un = (p_unix) auxiliar_checkgroup(L, "unix{any}", 1);
|
|
- lua_pushboolean(L, !buffer_isempty(&un->buf));
|
|
+ lua_pushboolean(L, !ls_buffer_isempty(&un->buf));
|
|
return 1;
|
|
}
|
|
|
|
@@ -176,7 +176,7 @@ static int meth_accept(lua_State *L) {
|
|
io_init(&clnt->io, (p_send)socket_send, (p_recv)socket_recv,
|
|
(p_error) socket_ioerror, &clnt->sock);
|
|
timeout_init(&clnt->tm, -1, -1);
|
|
- buffer_init(&clnt->buf, &clnt->io, &clnt->tm);
|
|
+ ls_buffer_init(&clnt->buf, &clnt->io, &clnt->tm);
|
|
return 1;
|
|
} else {
|
|
lua_pushnil(L);
|
|
@@ -336,7 +336,7 @@ static int global_create(lua_State *L) {
|
|
io_init(&un->io, (p_send) socket_send, (p_recv) socket_recv,
|
|
(p_error) socket_ioerror, &un->sock);
|
|
timeout_init(&un->tm, -1, -1);
|
|
- buffer_init(&un->buf, &un->io, &un->tm);
|
|
+ ls_buffer_init(&un->buf, &un->io, &un->tm);
|
|
return 1;
|
|
} else {
|
|
lua_pushnil(L);
|