[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.1.4-rc1 now available
- From: David Manura <dm.lua@...>
- Date: Tue, 12 Aug 2008 18:51:08 +0000 (UTC)
Luiz Henrique de Figueiredo writes:
> Lua 5.1.4-rc1 is now available...
(1)
The docs on some luaL_* functions are not always precise concerning whether a
value must have a certain type or merely be convertible to that type. For
example, luaL_checknumber has the description "Checks whether the function
argument narg is a number...", but it internally uses lua_tonumber/lua_isnumber,
which checks whether the value is merely convertible to a number. Compare to
the documentation of lua_isnumber/lua_isstring/luaL_checkstring, which
explicitly states that conversion occurs. The same might be said about a few
other functions, e.g. luaL_checkinteger, luaL_optnumber, etc. However, this may
also equally apply to the documentation of many Lua functions like string.lower.
string.lower(5) does work. Maybe that is implied by "2.2.1 - Coercion":
"whenever a number is used where a string is expected, the number is converted
to a string, in a reasonable format". 2.2.1 does not say anything about
Booleans--e.g. every value is convertible to a Boolean, so lua_isboolean must
not do any coercion to be meaningful.
(2)
It would be nice to eliminate the _longjmp/_setjmp warning when compiling under
Cygwin using "make posix" (or "make linux"):
[1] http://lua-users.org/lists/lua-l/2008-01/msg00367.html
[2] http://lua-users.org/lists/lua-l/2006-01/msg00680.html
[3] http://www.opengroup.org/onlinepubs/009695399/functions/_longjmp.html
It is caused by the LUA_USE_ULONGJMP define implied by LUA_USE_POSIX. This
warning is harmless though, and I'm not sure how it affects other builds.