Update of /cvsroot/wxlua/wxLua/bindings/wxlua
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/bindings/wxlua
Modified Files:
override.hpp
Log Message:
Removed %encapsulate and %noclassinfo tags for %classes in the bindings.
No longer encapsulating non wxObjects in a wxObject class for deletion.
We now provide delete functions for each class in the wxLuaBindClass
structs to be called on the void* we get from Lua.
Index: override.hpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/override.hpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** override.hpp 14 May 2009 05:06:21 -0000 1.23
--- override.hpp 1 Oct 2009 04:21:00 -0000 1.24
***************
*** 156,160 ****
if (!wxluaO_isgcobject(L, 1))
{
! FIXME we need to implement a generic way to use the wxObject encapsulation classes
ret = true;
}
--- 156,160 ----
if (!wxluaO_isgcobject(L, 1))
{
! FIXME do we need to implement this function for anybody
ret = true;
}
***************
*** 571,574 ****
--- 571,608 ----
return 0;
}
+ else if (strcmp(idx_str, "baseclass_wxluatypes") == 0)
+ {
+ if (wxlClass->baseclass_wxluatypes)
+ {
+ lua_newtable(L);
+ size_t i = 0;
+ while (wxlClass->baseclass_wxluatypes[i])
+ {
+ lua_pushnumber(L, *wxlClass->baseclass_wxluatypes[i]);
+ lua_rawseti(L, -2, i + 1);
+ ++i;
+ }
+ return 1;
+ }
+
+ return 0;
+ }
+ else if (strcmp(idx_str, "baseclass_vtable_offsets") == 0)
+ {
+ if (wxlClass->baseclass_wxluatypes) // check this for NULL not baseclass_vtable_offsets
+ {
+ lua_newtable(L);
+ size_t i = 0;
+ while (wxlClass->baseclass_wxluatypes[i]) // see above
+ {
+ lua_pushnumber(L, wxlClass->baseclass_vtable_offsets[i]);
+ lua_rawseti(L, -2, i + 1);
+ ++i;
+ }
+ return 1;
+ }
+
+ return 0;
+ }
else if (strcmp(idx_str, "enums") == 0)
{
***************
*** 871,875 ****
returns = new wxLuaObject(wxlState, 1);
// add to tracked memory list
! wxluaO_addgcobject(L, returns);
// push the constructed class pointer
wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaObject);
--- 905,909 ----
returns = new wxLuaObject(wxlState, 1);
// add to tracked memory list
! wxluaO_addgcobject(L, returns, wxluatype_wxLuaObject);
// push the constructed class pointer
wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaObject);
|