1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Try to preserve metatable when exchanging data with the async env (#14369)

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
This commit is contained in:
y5nw 2024-03-06 18:04:49 +01:00 committed by GitHub
parent badd42789a
commit fc80f65a6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 126 additions and 6 deletions

View file

@ -34,9 +34,10 @@ extern "C" {
states and cannot be used for persistence or network transfer.
*/
#define INSTR_SETTABLE (-10)
#define INSTR_POP (-11)
#define INSTR_PUSHREF (-12)
#define INSTR_SETTABLE (-10)
#define INSTR_POP (-11)
#define INSTR_PUSHREF (-12)
#define INSTR_SETMETATABLE (-13)
/**
* Represents a single instruction that pushes a new value or operates with existing ones.
@ -70,6 +71,7 @@ struct PackedInstr
- function: buffer
- w/ set_into: string key (no null bytes!)
- userdata: name in registry
- INSTR_SETMETATABLE: name of the metatable
*/
std::string sdata;