[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LUAJIT varargs problem?
- From: KHMan <keinhong@...>
- Date: Thu, 03 Jan 2008 18:42:54 +0800
Jean-Claude Wippler wrote:
>> --- begin of test.lua
>> function test(...)
>> for i=1, #arg do
>> print(arg[i])
>> end
>> end
> [snip snip]
> function test(...)
> for i=1, select("#",...) do
> print((select(i,...)))
> end
> end
>
> test(1,2,3)
>
> (or use "{...}" to convert the varargs into a table)
In short, arg is a deprecated feature for 5.1 and is compiled in
some Lua binaries for compatibility purposes. The LuaJIT you are
using may not have such compatibility features compiled in and as
such, you may need to consider recompilation or a Lua codebase
update. A small price to pay for staying trim and slim. :-)
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia