mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
add static Lua-style functions: Bytearray.insert, Bytearray.remove, Bytearray.append
This commit is contained in:
parent
9169049530
commit
fb07c86ea6
4 changed files with 73 additions and 51 deletions
|
|
@ -747,7 +747,7 @@ namespace lua {
|
|||
}
|
||||
|
||||
inline int create_bytearray(lua::State* L, const void* bytes, size_t size) {
|
||||
lua::requireglobal(L, "Bytearray");
|
||||
lua::requireglobal(L, "Bytearray_construct");
|
||||
lua::pushlstring(
|
||||
L, std::string_view(reinterpret_cast<const char*>(bytes), size)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue