From: John L. <jr...@us...> - 2007-12-19 00:42:15
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1877/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: Add wxLuaState::lua_TowxString and make lua_ToString return const char* Cleanup the overload function code and give better messages. Set the wxLuaBindMethod struct as an upvalue for C function calls TODO: give better error messages using it. Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** wxlstate.h 18 Dec 2007 01:03:34 -0000 1.108 --- wxlstate.h 19 Dec 2007 00:42:10 -0000 1.109 *************** *** 1011,1024 **** // which will be deleted by this. // See wxlua_setderivedmethod ! bool SetDerivedMethod(void *pObject, const char *method_name, wxLuaObject* wxlObj); // Is there a derived method given an object and and a method name. // If push_method then push the method onto the stack. // A derived method is when a function or value is set to a wxLua userdata. // See wxlua_hasderivedmethod(). ! bool HasDerivedMethod(void *pObject, const char *method_name, bool push_method) const; // When an object is being garbage collected and we call RemoveTrackedObject // object on it, we should also remove any derived functions or values it may have. // See wxlua_removederivedmethods() ! bool RemoveDerivedMethods(void *pObject) const; // Find a derived method given an object and and a method name. // If the method can be found, return the valid wxLuaState it belongs to. --- 1011,1024 ---- // which will be deleted by this. // See wxlua_setderivedmethod ! bool SetDerivedMethod(void *obj_ptr, const char *method_name, wxLuaObject* wxlObj); // Is there a derived method given an object and and a method name. // If push_method then push the method onto the stack. // A derived method is when a function or value is set to a wxLua userdata. // See wxlua_hasderivedmethod(). ! bool HasDerivedMethod(void *obj_ptr, const char *method_name, bool push_method) const; // When an object is being garbage collected and we call RemoveTrackedObject // object on it, we should also remove any derived functions or values it may have. // See wxlua_removederivedmethods() ! bool RemoveDerivedMethods(void *obj_ptr) const; // Find a derived method given an object and and a method name. // If the method can be found, return the valid wxLuaState it belongs to. *************** *** 1027,1031 **** // It is probably easier to merely make a wxLuaState a class member for // faster lookup though. ! static wxLuaState GetDerivedMethodState(void *pObject, const char *method); // ----------------------------------------------------------------------- --- 1027,1031 ---- // It is probably easier to merely make a wxLuaState a class member for // faster lookup though. ! static wxLuaState GetDerivedMethodState(void *obj_ptr, const char *method_name); // ----------------------------------------------------------------------- *************** *** 1063,1067 **** int lua_ToInteger(int index) const; int lua_ToBoolean(int index) const; ! wxString lua_ToString(int index) const; size_t lua_StrLen(int index) const; size_t luaL_ObjLen(int index) const; --- 1063,1068 ---- int lua_ToInteger(int index) const; int lua_ToBoolean(int index) const; ! const char* lua_ToString(int index) const; ! wxString lua_TowxString(int index) const; // wxLua added size_t lua_StrLen(int index) const; size_t luaL_ObjLen(int index) const; |