Update of /cvsroot/wxlua/wxLua/bindings/wxlua
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28571/wxLua/bindings/wxlua
Modified Files:
override.hpp wxlua.i
Log Message:
Add unused (as of yet) WXLUAMETHOD_ENCAPSULATE bit for wxLuaMethod struct
Add binding function wxlua.ungcobject(void*) (for testing really)
Add hack for wxGridCellWorker::GetRef() to see what the ref count is.
uses ugly #define to get to it's private m_nRef member.
Index: wxlua.i
===================================================================
RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/wxlua.i,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** wxlua.i 31 Jan 2008 05:09:19 -0000 1.18
--- wxlua.i 17 Mar 2008 03:05:01 -0000 1.19
***************
*** 63,66 ****
--- 63,81 ----
// ---------------------------------------------------------------------------
+ // Force the Lua garbage collector to act or ignore object *DANGEROUS*
+ //
+ // These are *only* meant for very special cases and should NOT be used unless
+ // you have an initmate knowledge about the object and how it will be treated
+ // by wxWidgets, wxLua, and Lua.
+
+ // Add the userdata object to the list of objects that will be deleted when
+ // it does out of scope and the Lua garbage collector runs.
+ // %function bool gcobject(void* object)
+
+ // Remove the userdata object from the list of objects that will be deleted when
+ // it does out of scope and the Lua garbage collector runs.
+ %function bool ungcobject(void* object)
+
+ // ---------------------------------------------------------------------------
// Type information about the bindings or current userdata
Index: override.hpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/override.hpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** override.hpp 31 Jan 2008 05:09:19 -0000 1.20
--- override.hpp 17 Mar 2008 03:05:01 -0000 1.21
***************
*** 149,152 ****
--- 149,184 ----
+ %override wxLua_function_gcobject
+ // %function bool gcobject(void* object)
+ static int LUACALL wxLua_function_gcobject(lua_State *L)
+ {
+ bool ret = false;
+ if (!wxluaO_isgcobject(L, 1))
+ {
+ FIXME we need to implement a generic way to use the wxObject encapsulation classes
+ ret = true;
+ }
+
+ lua_pushboolean(L, ret);
+ return 1;
+ }
+ %end
+
+ %override wxLua_function_ungcobject
+ // %function bool ungcobject(void* object)
+ static int LUACALL wxLua_function_ungcobject(lua_State *L)
+ {
+ bool ret = false;
+ if (wxluaO_isgcobject(L, 1))
+ {
+ ret = wxluaO_undeletegcobject(L, 1);
+ }
+
+ lua_pushboolean(L, ret);
+ return 1;
+ }
+ %end
+
+
%override wxLua_function_type
// %function int type(int wxluaarg_tag)
|