[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: error when loading strict.lua
- From: "Dirk Feytons" <dirk.feytons@...>
- Date: Thu, 13 Sep 2007 15:37:42 +0200
On 9/13/07, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> > lua_State* L = luaL_newstate();
> > if (luaL_dofile(L, "strict.lua")) {
> > printf("failed to load strict.lua: %s\n", lua_tostring(L, -1));
> > }
> >
> > However, this fails and the error is "C stack overflow"
>
> You need luaL_openlibs(L) before luaL_dofile here. But the error message
> should have been "attempt to call global 'getmetatable' (a nil value)".
It was not in my code snippet but luaL_openlibs(L) is done after
creating the state (I patched luaL_newstate()) so that isn't the
cause.
--
Dirk