lua-users home
lua-l archive

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


于 2011-11-17 22:31, Roberto Ierusalimschy 写道:
On Wed, Nov 16, 2011 at 11:07 PM, 文曦畅<wenxichang@163.com>  wrote:
(function ()
local localfunc = ...

globalfunc = ...
end)()
This is not valid Lua code.
Besides, the other code seems to be wrong too (although valid):

   (dofile(file)) ();    -- load another lua file and execute

Maybe it should be 'loadfile'? (But then it does not segfault in
my machine...)

-- Roberto



sorry, the code was omitted
i means:

(function()
    local localfunc = function() end
    globalfunc = function() end
end)()

this seg fault problem is related to the mail:
a deeply-hidden bug when parsing file with gc enabled (baselib loadfile)



patch was given in 2011/10/21, i am not sure whether it works in my cases, i will test it tomorrow.