Example #1
0
CLuaFunctionRef::CLuaFunctionRef(const CLuaFunctionRef& other) : m_ListNode(this)
{
    m_luaVM = other.m_luaVM;
    m_iFunction = other.m_iFunction;
    m_pFuncPtr = other.m_pFuncPtr;
    ms_AllRefList.push_back(this);
    luaM_inc_use(m_luaVM, m_iFunction, m_pFuncPtr);
}
Example #2
0
CLuaFunctionRef& CLuaFunctionRef::operator=( const CLuaFunctionRef& other )
{
    luaM_dec_use ( m_luaVM, m_iFunction, m_pFuncPtr );

    m_luaVM = other.m_luaVM;
    m_iFunction = other.m_iFunction;
    m_pFuncPtr = other.m_pFuncPtr;
    luaM_inc_use ( m_luaVM, m_iFunction, m_pFuncPtr );
    return *this;
}