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

feat(lua_iteration): Add explicit support for iterating over parts of the API #6

Open
AndreLouisIssa opened this issue Dec 8, 2023 · 0 comments

Comments

@AndreLouisIssa
Copy link

AndreLouisIssa commented Dec 8, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant