[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (work4) now available
- From: Peter Cawley <lua@...>
- Date: Tue, 10 Aug 2010 21:36:24 +0100
On Tue, Aug 10, 2010 at 9:34 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> On Sat, Jul 31, 2010 at 5:08 PM, Luiz Henrique de Figueiredo
>> <lhf@tecgraf.puc-rio.br> wrote:
>> > Lua 5.2.0 (work4) is now available at
>> > http://www.lua.org/work/lua-5.2.0-work4.tar.gz
>>
>> luaB_print (lbaselib.c) still gets the tostring global function. This
>> should probably be changed to call the new luaL_tolstring (which
>> luaB_tostring now calls)?
>
> We may change that, but currently this is a "feature". (You can redefine
> "tostring" to change how Lua prints stuff. Of course you may as well
> redefine "print"...)
It does mean that if you somehow erase the global "tostring", then
print also dies when printing plain strings:
> tostring = nil
> print("Hello World")
attempt to call a nil value
stack traceback:
[C]: in function 'print'
stdin:1: in main chunk
[C]: ?