[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    lua_cstack_reset?
From:       rw20 () cornell ! edu
Date:       1999-08-03 16:33:27
Message-ID: Pine.SOL.3.91.990803120228.17283A-100000 () travelers ! mail ! cornell ! edu
[Download RAW message or body]


In some application one knows for certain that the lua-C stack should be 
clear.  For instance, when lua only runs in response to and event of some 
sort you can clear the stacks before sending the event to lua.

I guess guess the best thing to do is actually manage the stack with 
lua_beginblock and lua_endblock statements, but is there anything wrong 
with using lua_cstack_reset in such cases?

in lua 3.1 something like this seemed to work:
void lua_reset(){
   // zero the cstack
   lua_state->Cstack.base=0;
   lua_state->Cstack.lua2C=0;
}

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic