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

Refactor Lua bitwise operations using explicit shim #957

Merged
merged 3 commits into from
Jul 18, 2020

Conversation

alerque
Copy link
Member

@alerque alerque commented Jul 18, 2020

This is to smooth the way for Lua 5.4 support (see #668 and #929), inspired by discussion here. The bit32 Lua Rock actually tries to be a shim providing Lua 5.2-like functions to Lua 5.1, but it is problematic on newer Lua's that subsequently deprecated that module. It isn't that easy to supply a module when the VM is lying to you about whether the module is already builtin or not.

This explicitly moves all out usage to a shim where we can handle how to shim each version on our own. This will now use bit32 to shim Lua 5.1, but use the built in language operators in Lua 5.3+. These operations aren't technically 100% equivalent, but they work for what we are doing with them.

@alerque alerque added the todo label Jul 18, 2020
@alerque alerque added this to the v0.10.8 milestone Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants