mathx / Lua 5.3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

mathx / Lua 5.3

François Perrad
The some mathematical functions were been deprecated by Lua 5.3.
There stay available with LUA_COMPAT_5_2.
The third party library
[mathx](http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/5.3/lmathx.tar.gz)
supplies them too.

Badly, `mathx` uses `luaL_checkint` instead of `luaL_checkinteger`.
So, `mathx` must compiled with LUA_COMPAT_5_2.

In conclusion, no working solution without LUA_COMPAT_5_2.

François.

Reply | Threaded
Open this post in threaded view
|

Re: mathx / Lua 5.3

Luiz Henrique de Figueiredo
> Badly, `mathx` uses `luaL_checkint` instead of `luaL_checkinteger`.
> So, `mathx` must compiled with LUA_COMPAT_5_2.

Here is a simple fix, to be applied in lmathx.c:

< #define I(i) luaL_checkint(L,i)
---
> #define I(i) (int) luaL_checkinteger(L,i)

I'll update the code in the site soon.

Thanks for the report.
--lhf