lua-users home
lua-l archive

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


I remeber that this do not happen use  lua 5.1.4 and lanes 2.03.

2010/11/30 zhiguo zhao <zhaozg@gmail.com>
After more test get this!
---------------
D:\projects\TAS\server>d:\work\luabuild\bin\Win32Debug\luajit
LuaJIT 2.0.0-beta5 -- Copyright (C) 2005-2010 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE4.1 fold cse dce fwd dse narrow loop abc fuse
> require "lanes"
d:\projects\TAS\server\lib\lanes.lua:359: Need to see 'tostring()' once
stack traceback:
        [C]: in function 'get'
        d:\projects\TAS\server\lib\lanes.lua:359: in main chunk
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: ?
> require "lanes"
> require "lanes"
> require "lanes"
> print(lanes)
table: 0x0015f2e0
>

2010/11/30 zhiguo zhao <zhaozg@gmail.com>

Hi, man in lua.

Why I first require lanes failed, but it works after call tostring?

Any one can say it! Thanks.
------------------------------------
LuaJIT 2.0.0-beta5 -- Copyright (C) 2005-2010 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE4.1 fold cse dce fwd dse narrow loop abc fuse
> require "lanes"
d:\projects\TAS\server\lib\lanes.lua:359: Need to see 'tostring()' once
stack traceback:
        [C]: in function 'get'
        d:\projects\TAS\server\lib\lanes.lua:359: in main chunk
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: ?
> print(tostring)
function: fast#14
> print(tostring(1))
1
> require "lanes"
>