[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (rc2) now available
- From: Vinicius Jarina <viniciusjarina@...>
- Date: Mon, 28 Nov 2011 10:50:39 -0200
I am trying to build lua52.dll, lua.exe and luac.exe on Windows (using MSVC).
lua.exe build is ok.
But I got some link errors when building luac.exe.
* luaU_dump (exported as LUAI_FUNC not LUA_API)
* luaP_opnames (exported as LUAI_DDEC -> extern)
* luaP_opmodes (exported as LUAI_DDEC -> extern)
Anyone else had this problem.
On Sun, Nov 27, 2011 at 6:43 PM, Roberto Ierusalimschy <firstname.lastname@example.org>
> If anything this discussion shows that no policy lua sets will beI do not think that table.pack returning a .n field is a policy set
> satisfactory for every use case. As I've said in the past, I would rather
> see lua adopt its philosophy of allowing the programmer set the policy:
> don't set 'n', return the length in the second return.
by Lua. In particular, no function assumes the existence of such a
field. This is just particular to table.pack.
(The old implementation of varargs used such a field and that was never
a problem. The problem was the use of that field by remove/insert and
similar functions. That set a policy.)
Previous experience with string.gsub shows that, sometimes, it is not
such a good idea for a function to return two values; it often leads
to confusion when people forget about the second return. The message
that started this discussion hints that table.pack with two returns
would be in the same category of string.gsub.