diff options
author | Aki <please@ignore.pl> | 2021-03-04 00:26:04 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-03-04 00:26:04 +0100 |
commit | 296fe762dd2207d4052c0d41c9186ac23922dd1d (patch) | |
tree | e79f48467f8abf09ec65076bf6f430411a51e54b | |
parent | eb8aab2bb5906fe26a881b526da5696e49abddc5 (diff) | |
download | plop-296fe762dd2207d4052c0d41c9186ac23922dd1d.zip plop-296fe762dd2207d4052c0d41c9186ac23922dd1d.tar.gz plop-296fe762dd2207d4052c0d41c9186ac23922dd1d.tar.bz2 |
Added stubs to stream metatable
-rw-r--r-- | stream.c | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -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); } |