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

Implement Push for LuaTable #175

Open
linkmauve opened this issue Nov 3, 2017 · 1 comment
Open

Implement Push for LuaTable #175

linkmauve opened this issue Nov 3, 2017 · 1 comment

Comments

@linkmauve
Copy link
Contributor

It’s currently impossible to push a LuaTable value on the stack, which makes it impossible to e.g. return a table from a module, to expose its API publicly in its namespace.

@tpdickso
Copy link

tpdickso commented Nov 8, 2017

A LuaTable is a borrowed table from a lua context; in particular, borrowing a table requires AsMutLua, because reading and writing values from the table requires manipulating the lua stack. As long as the lua context is borrowed, it isn't guaranteed to be in a consistent state for other operations to be performed. Thus, it isn't actually possible to Push while you have a LuaTable borrowed. A solution might have to take a different form.

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

2 participants