Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Scripting: Add setmetatable back to the lua sandbox #15653

Merged
merged 1 commit into from
Oct 26, 2020

Conversation

WickedShell
Copy link
Contributor

This enables proper OOP implementation in Lua. setmetatable is much safer then I had been thinking (I had mentally swapped it with what you can do with debug.setmetatable which is unsafe. This allows us to do proper OOP stuff such as what's depicted here. This replaces the sytle shown here: #14350. The significant win of this is that this enabled object oriented usage without using nearly as much memory for each object.

@tridge tridge merged commit 1a1a5e6 into ArduPilot:master Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants