Update of /cvsroot/wxlua/wxLua/bindings/wxlua
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv692/wxLua/bindings/wxlua
Modified Files:
override.hpp wxlua_rules.lua
Log Message:
Use positive values for WXLUA_TXXX types not negative.
Initialize the wxLua types when the bindings are initialized
not when installed into Lua so we can install the bindings
in any order or number for multiple wxLuaStates.
Index: override.hpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/override.hpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** override.hpp 5 Jan 2008 00:15:45 -0000 1.17
--- override.hpp 23 Jan 2008 06:43:34 -0000 1.18
***************
*** 727,731 ****
wxluaO_addgcobject(L, returns);
// push the constructed class pointer
! wxluaT_pushuserdatatype(L, returns, g_wxluatype_wxLuaObject);
// return the number of parameters
return 1;
--- 727,731 ----
wxluaO_addgcobject(L, returns);
// push the constructed class pointer
! wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaObject);
// return the number of parameters
return 1;
***************
*** 738,742 ****
{
// get this
! wxLuaObject *self = (wxLuaObject *)wxluaT_getuserdatatype(L, 1, g_wxluatype_wxLuaObject);
// call SetObject
self->SetObject(1);
--- 738,742 ----
{
// get this
! wxLuaObject *self = (wxLuaObject *)wxluaT_getuserdatatype(L, 1, wxluatype_wxLuaObject);
// call SetObject
self->SetObject(1);
***************
*** 751,755 ****
{
// get this
! wxLuaObject *self = (wxLuaObject *)wxluaT_getuserdatatype(L, 1, g_wxluatype_wxLuaObject);
// call GetObject that push the item onto the stack, or nil
if (self->GetObject())
--- 751,755 ----
{
// get this
! wxLuaObject *self = (wxLuaObject *)wxluaT_getuserdatatype(L, 1, wxluatype_wxLuaObject);
// call GetObject that push the item onto the stack, or nil
if (self->GetObject())
Index: wxlua_rules.lua
===================================================================
RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/wxlua_rules.lua,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** wxlua_rules.lua 16 Jul 2007 19:34:15 -0000 1.2
--- wxlua_rules.lua 23 Jan 2008 06:43:34 -0000 1.3
***************
*** 125,129 ****
-- hook_cpp_binding_classname. You can load any other custom bindings here.
-- Typically this is not necessary and you can rem this out.
! --wxLuaBinding_PostRegister =
--=============================================================================
--- 125,137 ----
-- hook_cpp_binding_classname. You can load any other custom bindings here.
-- Typically this is not necessary and you can rem this out.
! wxLuaBinding_PostRegister =
! [[
! wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState"));
! lua_State* L = wxlState.GetLuaState();
!
! lua_pushlstring(L, "NULL", 4);
! wxluaT_pushuserdatatype(L, NULL, wxluatype_NULL, true, true);
! lua_rawset(L, luaTable); // set t["NULL"] = userdata(NULL) w/ NULL tag
! ]]
--=============================================================================
|