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 compatibility #11

Open
apdougla opened this issue Dec 6, 2018 · 1 comment
Open

Lua 5.3 compatibility #11

apdougla opened this issue Dec 6, 2018 · 1 comment

Comments

@apdougla
Copy link

apdougla commented Dec 6, 2018

For compatibility with lua 5.3.5, please consider making the following changes:

diff -rw lua-matrix-master lua-matrix-master-5.3.5

diff -rw lua-matrix-master/lua/matrix.lua lua-matrix-master-5.3.5/lua/matrix.lua

1042c1042

< mtx[i][j] = tonumber( loadstring( "return "..m1[i][j][1] )() )

---

> mtx[i][j] = tonumber( load( "return "..m1[i][j][1] )() )

diff -rw lua-matrix-master/samples/fit.lua lua-matrix-master-5.3.5/samples/fit.lua

33c33

< return unpack( tres )

---

> return table.unpack( tres )

diff -rw lua-matrix-master/test/test_complex.lua lua-matrix-master-5.3.5/test/test_complex.lua

17,18c17,18

< assert( tostring( complex '-10.2e2' ) == '-1020' )

< assert( tostring( complex '-10.2E+02' ) == '-1020' )

---

> assert( complex.tostring( complex('-10.2e2'), '%.0f' ) == '-1020' )

> assert( complex.tostring( complex('-10.2E+02'), '%.0f' ) == '-1020' )

@bachp2
Copy link

bachp2 commented Jun 23, 2019

ow this hurts my eyes

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

No branches or pull requests

2 participants