Update of /cvsroot/wxlua/wxLua/modules/wxlua/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23442/wxLua/modules/wxlua/src
Modified Files:
wxlstate.cpp
Log Message:
Update docs to 2.8 and some syntax fixes
Fix popping too many items from the stack when finding the wxLuaStateRefData from the lua_State
Index: wxlstate.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -d -r1.94 -r1.95
*** wxlstate.cpp 23 Mar 2007 04:27:23 -0000 1.94
--- wxlstate.cpp 27 Apr 2007 20:26:57 -0000 1.95
***************
*** 1131,1137 ****
wxLuaStateRefData* d = NULL;
! // try to get the state
lua_pushstring( L, "__wxLuaStateRefData" );
! lua_gettable( L, LUA_REGISTRYINDEX );
// if nothing was returned or it wasn't a ptr, abort
--- 1131,1137 ----
wxLuaStateRefData* d = NULL;
! // try to get the state we've stored
lua_pushstring( L, "__wxLuaStateRefData" );
! lua_rawget( L, LUA_REGISTRYINDEX );
// if nothing was returned or it wasn't a ptr, abort
***************
*** 1139,1145 ****
d = (wxLuaStateRefData*)lua_touserdata( L, -1 );
! lua_pop(L, 2);
- //lua_settop( L, top );
return d;
}
--- 1139,1144 ----
d = (wxLuaStateRefData*)lua_touserdata( L, -1 );
! lua_pop(L, 1); // pop the wxLuaStateRefData or nil on failure
return d;
}
|