mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Fix setting userdata (static) fields when it has __index metamethod/function.
Closes #312
This commit is contained in:
@@ -2667,6 +2667,7 @@ impl Lua {
|
||||
rawset_field(state, metatable_index, "__index")?;
|
||||
}
|
||||
_ => {
|
||||
ffi::lua_pop(state, 1);
|
||||
// Propagate fields to the field getters
|
||||
for (k, f) in registry.fields {
|
||||
registry.field_getters.push((k, f))
|
||||
|
||||
Reference in New Issue
Block a user