From: John L. <jr...@us...> - 2007-06-25 19:45:02
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26860/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: Rename wxluabind_get/setTableFunction to what it really is wxluabind_index/newindex_wxLuaBindClass Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** wxlstate.cpp 25 Jun 2007 16:07:58 -0000 1.116 --- wxlstate.cpp 25 Jun 2007 19:44:54 -0000 1.117 *************** *** 40,49 **** #include "wx/tokenzr.h" ! int wxlua_lreg_references_key = WXLUA_LREG_REFERENCES; ! int wxlua_lreg_classes_key = WXLUA_LREG_CLASSES; ! int wxlua_lreg_derivedmethods_key = WXLUA_LREG_DERIVED_METHODS; int wxlua_lreg_wxluastaterefdata_key = WXLUA_LREG_WXLUASTATEREFDATA; ! int wxlua_lreg_metatable_tag_key = WXLUA_METATABLE_TAG; ! int wxlua_lreg_metatable_class_key = WXLUA_METATABLE_CLASS; wxLuaState wxNullLuaState(false); --- 40,49 ---- #include "wx/tokenzr.h" ! int wxlua_lreg_references_key = WXLUA_LREG_REFERENCES; ! int wxlua_lreg_classes_key = WXLUA_LREG_CLASSES; ! int wxlua_lreg_derivedmethods_key = WXLUA_LREG_DERIVED_METHODS; int wxlua_lreg_wxluastaterefdata_key = WXLUA_LREG_WXLUASTATEREFDATA; ! int wxlua_lreg_metatable_tag_key = WXLUA_METATABLE_TAG; ! int wxlua_lreg_metatable_class_key = WXLUA_METATABLE_CLASS; wxLuaState wxNullLuaState(false); Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** wxlbind.cpp 18 Jun 2007 21:40:52 -0000 1.79 --- wxlbind.cpp 25 Jun 2007 19:44:53 -0000 1.80 *************** *** 245,252 **** // ---------------------------------------------------------------------------- ! // wxluabind_garbageCollect - if the class defines a gc function, then call it. // ---------------------------------------------------------------------------- ! int LUACALL wxluabind_garbageCollect(lua_State *L) { wxLuaBindClass *wxlClass = (wxLuaBindClass *)lua_touserdata(L, lua_upvalueindex(1)); --- 245,252 ---- // ---------------------------------------------------------------------------- ! // If the class defines a gc function, then call it. // ---------------------------------------------------------------------------- ! int LUACALL wxluabind_gc_wxLuaBindClass(lua_State *L) { wxLuaBindClass *wxlClass = (wxLuaBindClass *)lua_touserdata(L, lua_upvalueindex(1)); *************** *** 259,263 **** void* key = wxlua_ttouserdata(L, 1, true); ! wxCHECK_MSG(key != 0, 0, wxT("NULL user data in wxluabind_garbageCollect")); wxlState.RemoveTrackedObject(key, true); --- 259,263 ---- void* key = wxlua_ttouserdata(L, 1, true); ! wxCHECK_MSG(key != 0, 0, wxT("NULL user data in wxluabind_gc_wxLuaBindClass")); wxlState.RemoveTrackedObject(key, true); *************** *** 269,274 **** // ---------------------------------------------------------------------------- - // wxluabind_getTableFunc - // // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (gettable tag method). --- 269,272 ---- *************** *** 278,282 **** // ---------------------------------------------------------------------------- ! int LUACALL wxluabind_getTableFunc(lua_State *L) { wxLuaState wxlState(L); --- 276,280 ---- // ---------------------------------------------------------------------------- ! int LUACALL wxluabind_index_wxLuaBindClass(lua_State *L) { wxLuaState wxlState(L); *************** *** 376,386 **** // ---------------------------------------------------------------------------- - // wxluabind_setTableFunc - // // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (settable tag method). // ---------------------------------------------------------------------------- ! int LUACALL wxluabind_setTableFunc(lua_State *L) { wxLuaState wxlState(L); --- 374,382 ---- // ---------------------------------------------------------------------------- // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (settable tag method). // ---------------------------------------------------------------------------- ! int LUACALL wxluabind__newindex_wxLuaBindClass(lua_State *L) { wxLuaState wxlState(L); *************** *** 686,692 **** static const luaL_reg s_funcTable[] = { ! {"__gc", wxluabind_garbageCollect }, ! {"__index", wxluabind_getTableFunc }, ! {"__newindex", wxluabind_setTableFunc } }; static const size_t s_funcCount = sizeof(s_funcTable)/sizeof(s_funcTable[0]); --- 682,688 ---- static const luaL_reg s_funcTable[] = { ! {"__gc", wxluabind_gc_wxLuaBindClass }, ! {"__index", wxluabind_index_wxLuaBindClass }, ! {"__newindex", wxluabind__newindex_wxLuaBindClass } }; static const size_t s_funcCount = sizeof(s_funcTable)/sizeof(s_funcTable[0]); |