Exercises
- In the
Destinations
class, we only used one upvalue. Add another upvalue and play around with it. Which upvalue is at which pseudo-index? - Try to modify the second upvalue in a function and see if the value is persisted the next time the function is called. How about when it is accessed in another function?
- In
LuaType.hpp
, addLuaType::lightuserdata
and implement a structure for it, namedLuaLightUserData
. Support this case in the executor and helper functions. You do not need to support this type when popping values from the Lua stack.