Update of /cvsroot/wxlua/wxLua/bindings
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25224/wxLua/bindings
Modified Files:
genwxbind.lua
Log Message:
Use the new wxLuaState in place of wxLuaStateVariables (removed)
Index: genwxbind.lua
===================================================================
RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** genwxbind.lua 25 Nov 2005 10:09:10 -0000 1.7
--- genwxbind.lua 26 Nov 2005 08:46:57 -0000 1.8
***************
*** 3637,3650 ****
table.insert(fileData, "bool bind_"..hook_namespace.."(lua_State* L)\n")
table.insert(fileData, "{\n")
! table.insert(fileData, " GET_LUASTATEVARS_MSG(L, false)\n");
table.insert(fileData, "\n");
! table.insert(fileData, " wxASSERT(!stateVars->m_typesRegistered);\n");
! table.insert(fileData, " wxASSERT(!stateVars->GetLuaBinding(wxT(\""..hook_namespace.."\")));\n");
table.insert(fileData, "\n");
table.insert(fileData, " // ignore binding request when we already have "..hook_namespace.." registered\n");
! table.insert(fileData, " if (stateVars->GetLuaBinding(wxT(\""..hook_namespace.."\")))\n");
table.insert(fileData, " return false;\n");
table.insert(fileData, "\n");
! table.insert(fileData, " stateVars->m_bindings.Append(new "..hook_binding_class.."());\n");
table.insert(fileData, "\n");
table.insert(fileData, " return true;\n");
--- 3637,3651 ----
table.insert(fileData, "bool bind_"..hook_namespace.."(lua_State* L)\n")
table.insert(fileData, "{\n")
! table.insert(fileData, " wxLuaState wxLS(L);\n");
! table.insert(fileData, " wxCHECK_MSG(wxLS.Ok(), false, wxT(\"Invalid wxLuaState\"));\n");
table.insert(fileData, "\n");
! table.insert(fileData, " wxASSERT(!wxLS.GetLuaStateRefData()->m_typesRegistered);\n");
! table.insert(fileData, " wxASSERT(!wxLS.GetLuaBinding(wxT(\""..hook_namespace.."\")));\n");
table.insert(fileData, "\n");
table.insert(fileData, " // ignore binding request when we already have "..hook_namespace.." registered\n");
! table.insert(fileData, " if (wxLS.GetLuaBinding(wxT(\""..hook_namespace.."\")))\n");
table.insert(fileData, " return false;\n");
table.insert(fileData, "\n");
! table.insert(fileData, " wxLS.GetLuaStateRefData()->m_bindings.Append(new "..hook_binding_class.."());\n");
table.insert(fileData, "\n");
table.insert(fileData, " return true;\n");
|