lua-users home
lua-l archive

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


Patrick Donnelly <batrick@batbytes.com> wrote:
>
> A (C) Lua stack cannot exceed LUAI_MAXCSTACK (8000). You passed too
> many results to coroutine.resume:
>
> > t = {}; for i = 1, 8000 do t[i] = 1 end
> > coroutine.resume(coroutine.create(function() end), unpack(t))
> stdin:1: too many results to unpack

That isn't quite the right error message, but this is:

> t = {}; for i = 1, 7999 do t[i] = 1 end
> coroutine.resume(coroutine.create(function() return unpack(t) end))
stdin:1: too many results to resume
stack traceback:
        [C]: in function 'resume'
        stdin:1: in main chunk
        [C]: ?

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Rockall, Malin, Hebrides: South 5 to 7, occasionally gale 8 at first in
Rockall and Malin, veering west or northwest 4 or 5, then backing southwest 5
or 6 later. Rough or very rough. Occasional rain. Moderate or good,
occasionally poor.