lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all
How can I restore the default tag method for a global variable?

(The following code is how my routine set the custom tag method)

......
lua_newuserdatabox(m_pLS, this);
lua_pushcclosure(m_pLS,CScriptSystem::SetGlobalTagHandler, 1);
lua_settagmethod(m_pLS,m_nTag,"setglobal");
lua_newuserdatabox(m_pLS, this);
lua_pushcclosure(m_pLS,CScriptSystem::GetGlobalTagHandler, 1);
lua_settagmethod(m_pLS,m_nTag,"getglobal");
....
...
...
lua_newuserdatabox(m_pLS,pVal);
lua_settag(m_pLS, m_nTag);
lua_setglobal(m_pLS,sKey);

...
...

ciao
Alberto