Add explicit support for iterating over parts of the API
Namely (in order of most useful to least):
- Make
gm
's gm.call
__index
contributions iterable (could be gm.functions
)
- An iterable wrapper for global variables (could be
gm.globals
)
- An iterable wrapper for a CInstance's instance variables (could be
CInstance.variables
, this can be done purely in lua but would not need marshalling if it had built-in lua-value translation for RValues)
__pairs
and next
support in general for sol objects (this can be done purely in lua, but it is awkward)
__pairs
and next
support in general for enumeration tables (it can be done purely in lua since their __index
is a raw table)
For most of these, instead of separate iterable objects they could be done by extending __pairs
and next
on the existing structures.