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

Auto wrap functions passed to Lua.set! to receive %Lua{} #53

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

davydog187
Copy link
Contributor

This PR fixes the problem where functions passed to Lua.set!/3 were receiving the underlying Luerl record rather than a %Lua{} struct.

Also provides more flexibility to the return values of deflua functions that take Lua state, allowing them to omit passing the state, or return single values, and we will auto wrap them for you

Closes #47
Closes #51

This PR fixes the problem where functions passed to `Lua.set!/3` were
receiving the underlying Luerl record rather than a `%Lua{}` struct.

Also provides more flexibility to the return values of `deflua`
functions that take Lua state, allowing them to omit passing the state,
or return single values, and we will auto wrap them for you

Closes #47
Closes #51
lib/lua.ex Show resolved Hide resolved
@davydog187 davydog187 merged commit 5423eba into main Oct 3, 2024
1 check passed
@davydog187 davydog187 deleted the fix-state-return-values branch October 3, 2024 16:01
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

Successfully merging this pull request may close these issues.

Confusing return type expected for deflua functions with state Auto-wrap functions passed to Lua.set!/3
1 participant