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

Add lua_rawsetfield #671

Merged
merged 2 commits into from
Sep 15, 2022
Merged

Conversation

petrihakkinen
Copy link
Contributor

Luau currently has the following functions in the C API for dealing with tables without invoking metamethods:

lua_rawgetfield
lua_rawget
lua_rawgeti
lua_rawset
lua_rawseti

This change adds the missing function lua_rawsetfield for consistency and because it's more efficient to use it in place of plain lua_rawset which requires pushing the key and value separately.

Copy link
Collaborator

@zeux zeux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@zeux zeux merged commit 6fbea7c into luau-lang:master Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants