-
Notifications
You must be signed in to change notification settings - Fork 432
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
bit32 is missing under Lua 5.3 #1338
Comments
It's deprecated in Lua 5.3, Plan9k(MPT, not (yet) the floppy version) has compatibility code by default. Workaround code: --lua 5.3 <-> 5.2 compat
local bit32 = bit32 or load([[return {
band = function(a, b) return a & b end,
bor = function(a, b) return a | b end,
bxor = function(a, b) return a ~ b end,
bnot = function(a) return ~a end,
rshift = function(a, n) return a >> n end,
lshift = function(a, n) return a << n end,
}]])() It's missing one or two functions IIRC, but it is enough for 99% of programs |
"deprecated" meaning it's been completely removed from Lua 5.3. A workaround to re-add it would probably be good for compatibility, but I am not sure whether it should be done. |
Good to see that Plan9k uses it, shame that a lot of programs are made for OpenOS and haven't been ported over (like the aformentioned wocchat). |
If |
Eh, I suppose OpenOS could live with a compatibility lib in case it's 5.3, given how hot-swappable everything else is. |
In OpenOS as of f738684. Someone might want to test this, I only did very rudimentary checking... |
I'll give it a spin later on. |
It seems to be working well! 😀 |
This breaks programs that use it, like wocchat. 😞
The text was updated successfully, but these errors were encountered: