-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
This example for function State::new_userdata_typed is only correct if MyStruct does not have a destructor. The correct way to move a value into an uninitialized location is std::ptr::write
The given example:
unsafe { *state.new_userdata_typed() = MyStruct::new(...); }
state.set_metatable_from_registry("MyStruct");Metadata
Metadata
Assignees
Labels
No labels