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