[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: return value of lua_dostring
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 17 Jan 2001 22:20:34 -0200 (EDT)
>> Just like the return values of any function.
>Thanks. I presume that means that as per the notice "you are responsible for
>controlling stack overflow", that means that after calling lua_dostring it
>is necessary to call lua_settop(L, 0) to remove any remaining stack elements
>before calling lua_dostring again (to avoid eventual stack overflow)?
Yes, but lua_settop(L,n), where was n=lua_gettop(L) before the call to
lua_dostring. Or lua_pop(L,k), where k is the number of values returned
by lua_dostring (computed as the difference of lua_gettop(L) before and after
>This used to be handled by lua_beginblock/lua_endblock, didn't it?