-
Notifications
You must be signed in to change notification settings - Fork 15
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
Lua Writable Collections #160
Conversation
… be written to without access to C++ data structure construction methods for various types) by making them read only. Made AEmitter and PEmitter Emissions individually Lua writable, added getter and setter for Emission accumulator.
…ua by changing referenced std iterators to work over pointers instead of raw values, meaning the value copies passed to lua are value copies of pointers, not raw values.
Oof, I can understand this but it feels really awkward doing it like this. It has performance implications, it messies the code, and it introduces a lot of manual memory management. This is probably the safest approach, but at the same time it feels really awkward to have to do this everywhere we want to expose things to Lua... Some thoughts:
Interested in your thoughts |
Think it's still worth getting this in, so merging |
I disabled automerge for the moment, could've sworn I had an outgoing commit to push first, but false alarm. I can't turn it back on, however, presumably until the checks pass. |
A number of properties which were exposed to Lua as iterators could not have their elements modified. When an iterator was obtained for Lua, it returned an iterator over a list of copies of elements from the original C++ collection, meaning that changes to those copies would be ineffective. Affected collections included MOSR Gibs, AEmitter or PEmitter Emissions, and MetaMan Players, unaffected were all collections of pointers. Corrected by changing all of those lists to pointers.