Removing lua_reader and lua_writer from StreamBuffer
This commit is contained in:
@@ -724,6 +724,24 @@ public:
|
||||
lua_State *state() const { return L_; }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Lua Byte Reader
|
||||
//
|
||||
// Converts a block of bytes in RAM into a lua_reader.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
class LuaByteReader {
|
||||
private:
|
||||
const char *data_;
|
||||
int64_t size_;
|
||||
public:
|
||||
LuaByteReader(const char *d, int64_t s) : data_(d), size_(s) {}
|
||||
void *lua_reader_userdata() { return this; }
|
||||
static const char *lua_reader(lua_State *L, void *ud, size_t *size);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// The Lua Constant Registry
|
||||
|
||||
Reference in New Issue
Block a user