fix bug
This commit is contained in:
parent
7584c806f4
commit
d0f47f47a4
|
@ -44,6 +44,7 @@ function Console.create()
|
|||
end
|
||||
|
||||
function Console.destroy()
|
||||
Logger.setOnLog(nil)
|
||||
console:destroy()
|
||||
console = nil
|
||||
end
|
||||
|
|
|
@ -661,12 +661,6 @@ bool LuaInterface::next(int index)
|
|||
return lua_next(L, index);
|
||||
}
|
||||
|
||||
void LuaInterface::copy(int index)
|
||||
{
|
||||
assert(hasIndex(index));
|
||||
lua_pushvalue(L, index);
|
||||
}
|
||||
|
||||
void LuaInterface::getStackFunction(int level)
|
||||
{
|
||||
lua_Debug ar;
|
||||
|
@ -679,6 +673,7 @@ void LuaInterface::getStackFunction(int level)
|
|||
void LuaInterface::getRef(int ref)
|
||||
{
|
||||
lua_rawgeti(L, LUA_REGISTRYINDEX, ref);
|
||||
//logTraceDebug(ref);
|
||||
}
|
||||
|
||||
void LuaInterface::getWeakRef(int weakRef)
|
||||
|
@ -718,12 +713,14 @@ void LuaInterface::getMetatable(int index)
|
|||
void LuaInterface::getField(const char* key, int index)
|
||||
{
|
||||
assert(hasIndex(index));
|
||||
assert(isUserdata(index) || isTable(index));
|
||||
lua_getfield(L, index, key);
|
||||
}
|
||||
|
||||
void LuaInterface::setField(const char* key, int index)
|
||||
{
|
||||
assert(hasIndex(index));
|
||||
assert(isUserdata(index) || isTable(index));
|
||||
lua_setfield(L, index, key);
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,6 @@ public:
|
|||
void insert(int index);
|
||||
void remove(int index);
|
||||
bool next(int index = -2);
|
||||
void copy(int index = -1);
|
||||
|
||||
void getStackFunction(int level = 0);
|
||||
|
||||
|
|
|
@ -12,8 +12,10 @@ LuaObject::~LuaObject()
|
|||
|
||||
void LuaObject::releaseLuaFieldsTable()
|
||||
{
|
||||
if(m_fieldsTableRef != -1)
|
||||
if(m_fieldsTableRef != -1) {
|
||||
g_lua.unref(m_fieldsTableRef);
|
||||
m_fieldsTableRef = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void LuaObject::luaSetField(const std::string& key)
|
||||
|
|
|
@ -31,7 +31,6 @@ UIWidget::UIWidget(UIWidgetType type)
|
|||
|
||||
UIWidget::~UIWidget()
|
||||
{
|
||||
//logTraceDebug(m_id);
|
||||
if(!m_destroyed)
|
||||
logWarning("widget '", m_id, "' was destructed without being explicit destroyed");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue