From: John L. <jr...@us...> - 2007-08-01 03:21:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14531/wxLua/modules/wxbind/src Modified Files: wxcore_bind.cpp wxcore_sizer.cpp Log Message: Add the gl lib as a default fix some bindings that take int *var and return the value Index: wxcore_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_bind.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxcore_bind.cpp 19 Jul 2007 03:09:46 -0000 1.2 --- wxcore_bind.cpp 1 Aug 2007 03:21:24 -0000 1.3 *************** *** 3834,3838 **** #if wxLUA_USE_wxProcess ! static wxLuaArgTag s_wxluatagArray_wxLua_function_wxKill[] = { &s_wxluaarg_Number, &s_wxluaarg_Integer, &s_wxluaarg_LightUserData, &s_wxluaarg_Number, NULL }; // %function int wxKill(long pid, wxSignal sig = wxSIGTERM, wxKillError *rc = NULL, int flags = 0) static int LUACALL wxLua_function_wxKill(lua_State *L) --- 3834,3839 ---- #if wxLUA_USE_wxProcess ! static wxLuaArgTag s_wxluatagArray_wxLua_function_wxKill[] = { &s_wxluaarg_Number, &s_wxluaarg_Integer, &s_wxluaarg_Number, NULL }; ! // %override wxLua_function_wxKill // %function int wxKill(long pid, wxSignal sig = wxSIGTERM, wxKillError *rc = NULL, int flags = 0) static int LUACALL wxLua_function_wxKill(lua_State *L) *************** *** 3843,3849 **** int argCount = lua_gettop(L); // int flags = 0 ! int flags = (argCount >= 4 ? (int)wxlua_getnumbertype(L, 4) : 0); // wxKillError rc = NULL ! wxKillError * rc = (argCount >= 3 ? (wxKillError *)wxlState.ttouserdata(3) : NULL); // wxSignal sig = wxSIGTERM wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getintegertype(L, 2) : wxSIGTERM); --- 3844,3851 ---- int argCount = lua_gettop(L); // int flags = 0 ! int flags = (argCount >= 3 ? (int)wxlua_getnumbertype(L, 3) : 0); // wxKillError rc = NULL ! wxKillError rc = wxKILL_OK; ! //wxKillError * rc = (argCount >= 3 ? (wxKillError *)wxlState.ttouserdata(3) : NULL); // wxSignal sig = wxSIGTERM wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getintegertype(L, 2) : wxSIGTERM); *************** *** 3851,3861 **** long pid = (long)wxlua_getnumbertype(L, 1); // call wxKill ! returns = (wxKill(pid, sig, rc, flags)); // push the result number lua_pushnumber(L, returns); ! return 1; } ! static wxLuaBindCFunc s_wxluafunc_wxLua_function_wxKill[1] = {{ wxLua_function_wxKill, WXLUAMETHOD_CFUNCTION, 1, 4, s_wxluatagArray_wxLua_function_wxKill }}; #endif // wxLUA_USE_wxProcess --- 3853,3865 ---- long pid = (long)wxlua_getnumbertype(L, 1); // call wxKill ! returns = (wxKill(pid, sig, &rc, flags)); // push the result number lua_pushnumber(L, returns); + lua_pushnumber(L, rc); ! return 2; } ! ! static wxLuaBindCFunc s_wxluafunc_wxLua_function_wxKill[1] = {{ wxLua_function_wxKill, WXLUAMETHOD_CFUNCTION, 1, 3, s_wxluatagArray_wxLua_function_wxKill }}; #endif // wxLUA_USE_wxProcess Index: wxcore_sizer.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_sizer.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxcore_sizer.cpp 22 Jul 2007 04:38:29 -0000 1.2 --- wxcore_sizer.cpp 1 Aug 2007 03:21:24 -0000 1.3 *************** *** 4262,4284 **** int s_wxluatag_wxGBSizerItem = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGBSizerItem_GetEndPos[] = { &s_wxluatag_wxGBSizerItem, &s_wxluaarg_LightUserData, &s_wxluaarg_LightUserData, NULL }; static int LUACALL wxLua_wxGBSizerItem_GetEndPos(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxGBSizerItem_GetEndPos[1] = {{ wxLua_wxGBSizerItem_GetEndPos, WXLUAMETHOD_METHOD, 3, 3, s_wxluatagArray_wxLua_wxGBSizerItem_GetEndPos }}; // void GetEndPos(int& row, int& col) static int LUACALL wxLua_wxGBSizerItem_GetEndPos(lua_State *L) { wxLuaState wxlState(L); ! // int col ! int * col = (int *)wxlState.ttouserdata(3); ! // int row ! int * row = (int *)wxlState.ttouserdata(2); // get this wxGBSizerItem * self = (wxGBSizerItem *)wxlState.GetUserDataType(1, s_wxluatag_wxGBSizerItem); // call GetEndPos ! self->GetEndPos(*row, *col); ! ! return 0; } static wxLuaArgTag s_wxluatagArray_wxLua_wxGBSizerItem_GetGBSizer[] = { &s_wxluatag_wxGBSizerItem, NULL }; static int LUACALL wxLua_wxGBSizerItem_GetGBSizer(lua_State *L); --- 4262,4285 ---- int s_wxluatag_wxGBSizerItem = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGBSizerItem_GetEndPos[] = { &s_wxluatag_wxGBSizerItem, NULL }; static int LUACALL wxLua_wxGBSizerItem_GetEndPos(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxGBSizerItem_GetEndPos[1] = {{ wxLua_wxGBSizerItem_GetEndPos, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxGBSizerItem_GetEndPos }}; ! // %override wxLua_wxGBSizerItem_GetEndPos // void GetEndPos(int& row, int& col) static int LUACALL wxLua_wxGBSizerItem_GetEndPos(lua_State *L) { wxLuaState wxlState(L); ! int col = 0; ! int row = 0; // get this wxGBSizerItem * self = (wxGBSizerItem *)wxlState.GetUserDataType(1, s_wxluatag_wxGBSizerItem); // call GetEndPos ! self->GetEndPos(row, col); ! lua_pushnumber(L, row); ! lua_pushnumber(L, col); ! return 2; } + static wxLuaArgTag s_wxluatagArray_wxLua_wxGBSizerItem_GetGBSizer[] = { &s_wxluatag_wxGBSizerItem, NULL }; static int LUACALL wxLua_wxGBSizerItem_GetGBSizer(lua_State *L); |