Update of /cvsroot/wxlua/wxLua/modules/wxlua/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28571/wxLua/modules/wxlua/src
Modified Files:
wxlstate.cpp wxlua_bind.cpp
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: wxlstate.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v
retrieving revision 1.173
retrieving revision 1.174
diff -C2 -d -r1.173 -r1.174
*** wxlstate.cpp 2 Feb 2008 16:41:45 -0000 1.173
--- wxlstate.cpp 17 Mar 2008 03:05:04 -0000 1.174
***************
*** 525,529 ****
delete wxobj;
! lua_pop(L, 1); // pop lightuserdata
lua_pushlightuserdata(L, obj_ptr); // push key
--- 525,529 ----
delete wxobj;
! lua_pop(L, 1); // pop lightuserdata value
lua_pushlightuserdata(L, obj_ptr); // push key
Index: wxlua_bind.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlua_bind.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** wxlua_bind.cpp 31 Jan 2008 05:09:19 -0000 1.28
--- wxlua_bind.cpp 17 Mar 2008 03:05:04 -0000 1.29
***************
*** 1038,1041 ****
--- 1038,1058 ----
static wxLuaBindCFunc s_wxluafunc_wxLua_function_typename[1] = {{ wxLua_function_typename, WXLUAMETHOD_CFUNCTION, 1, 1, s_wxluatypeArray_wxLua_function_typename }};
+ static wxLuaArgType s_wxluatypeArray_wxLua_function_ungcobject[] = { &wxluatype_TLIGHTUSERDATA, NULL };
+ // %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;
+ }
+
+ static wxLuaBindCFunc s_wxluafunc_wxLua_function_ungcobject[1] = {{ wxLua_function_ungcobject, WXLUAMETHOD_CFUNCTION, 1, 1, s_wxluatypeArray_wxLua_function_ungcobject }};
+
static wxLuaArgType s_wxluatypeArray_wxLua_function_wxLUA_CHECK_VERSION[] = { &wxluatype_TNUMBER, &wxluatype_TNUMBER, &wxluatype_TNUMBER, NULL };
// %function bool wxLUA_CHECK_VERSION(int major, int minor, int release) // actually a define
***************
*** 1099,1102 ****
--- 1116,1120 ----
{ "type", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_type, 1, NULL },
{ "typename", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_typename, 1, NULL },
+ { "ungcobject", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_ungcobject, 1, NULL },
{ "wxLUA_CHECK_VERSION", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_wxLUA_CHECK_VERSION, 1, NULL },
{ "wxLUA_CHECK_VERSION_FULL", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_wxLUA_CHECK_VERSION_FULL, 1, NULL },
|