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

Lua 5.3 integer support #1150

Closed
wants to merge 4 commits into from
Closed

Lua 5.3 integer support #1150

wants to merge 4 commits into from

Conversation

Fsu0413
Copy link

@Fsu0413 Fsu0413 commented Nov 13, 2017

Lua 5.3 added an integer type.
The original number type is now treated as real type.

e.g.:

// push the number to Lua, in variable x
lua_pushnumber(L, (lua_Number)24);
-- x always is type of number, in Lua 5.3 it is real type
-- 24 is type of integer in Lua 5.3, in Lua 5.2 it is type of number
if x == 24 then
    print("Yes!")
else
    print("No!")
end

outputs "No!". Because x is now 24.0, not 24.
In Lua 5.2 and earlier this program should output "Yes." because both x and 24 is type of number.

This change breaks a lot of programs including swig-lua interface.
We can't use Lua 5.3 or later before this pr got merged to swig.

@ojwb ojwb added the Lua label Dec 5, 2017
@ojwb
Copy link
Member

ojwb commented Dec 5, 2017

All the Lua tests are failing in CI with:

../../../../../Lib/lua/lua.swg:179: Error: Syntax error in input(1).

Please run the test suite locally (make check-lua-test-suite) to catch such errors before pushing. It'll save you a lot of time too.

@ojwb
Copy link
Member

ojwb commented Mar 7, 2018

@Fsu0413 Did you see my comment above about this breaking the Lua testsuite?

@Fsu0413
Copy link
Author

Fsu0413 commented Mar 8, 2018

Sorry...I am not currently working on this issue.
Please wait until I found a way to solve it.

I'm closing this issue by now.

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.

None yet

2 participants