From 296fe762dd2207d4052c0d41c9186ac23922dd1d Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 4 Mar 2021 00:26:04 +0100 Subject: Added stubs to stream metatable --- stream.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/stream.c b/stream.c index eac89a8..d456619 100644 --- a/stream.c +++ b/stream.c @@ -28,9 +28,23 @@ int stream_push_new(lua_State * L, const int fd) lua_pushliteral(L, "__index"); lua_createtable(L, 0, 1); - lua_pushliteral(L, "read"); - lua_pushcfunction(L, stream_read); - lua_rawset(L, -3); + { + lua_pushliteral(L, "read"); + lua_pushcfunction(L, stream_read); + lua_rawset(L, -3); + + lua_pushliteral(L, "skip"); + lua_pushnil(L); // TODO: Implement skipping in input buffer. + lua_rawset(L, -3); + + lua_pushliteral(L, "write"); + lua_pushnil(L); // TODO: Implement writing operation. + lua_rawset(L, -3); + + lua_pushliteral(L, "flush"); + lua_pushnil(L); // TODO: Implement flush for output buffer. + lua_rawset(L, -3); + } lua_rawset(L, -3); } -- cgit v1.1