Removing lua_reader and lua_writer from StreamBuffer

This commit is contained in:
2023-10-18 14:03:05 -04:00
parent b4c2d21aee
commit 67b0265092
5 changed files with 56 additions and 61 deletions

View File

@@ -559,3 +559,12 @@ void LuaKeywordParser::final_check_throw() {
luaL_error(L_, "%s", err.c_str());
}
}
const char *LuaByteReader::lua_reader(lua_State *L, void *ud, size_t *size) {
LuaByteReader *reader = (LuaByteReader*)ud;
*size = reader->size_;
const char *data = reader->data_;
reader->data_ = 0;
reader->size_ = 0;
return data;
}