lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Google told me it was removed in Lua 5. The correct name is luaL_checknumber. I found that in 5.0.2 sources:
lua-5.0.2/include/lauxlib.h:132:#define luaL_check_number       luaL_checknumber
I guess there it's a compability macro in 5.0 that has been removed in 5.1. luaL_checknumber is ok in 5.0 too, so if you don't need Lua4.x support use the luaL_check* instead of luaL_check_*.

-----Message d'origine-----
De : lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] De la part de Rasmus Neckelmann
Envoyé : 30 mai 2006 15:10
À : Lua list
Objet : Re: Linking with Lua the best way

On 5/30/06, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> Your best bet is to link Lua statically into your program. To ensure 
> you have the correct version, distribute Lua with your program.

I did that originally, but then some linux package maintainers started complaining that all programs should link dynamically with libraries
:)
Of course, if that's the best bet I'll consider it again.

> BTW, why doesn't your program compile and run fine under Lua 5.1?

Specifically it complains about lack of luaL_check_number (and possibly other macros). Some googling told me that this macro have been removed from Lua 5.1.

--
Cheers,
Rasmus Neckelmann