| 807 | }*/ |
| 808 | |
| 809 | bool CScriptObject::AddFunction(const char *sName, SCRIPT_FUNCTION pThunk, int nFuncID) |
| 810 | { |
| 811 | _GUARD_STACK(m_pLS); |
| 812 | if (!_GET_THIS()) |
| 813 | return false; |
| 814 | |
| 815 | lua_pushstring(m_pLS, sName); |
| 816 | lua_pushnumber(m_pLS, (lua_Number)nFuncID); |
| 817 | //lua_newuserdatabox(m_pLS, m_pThis); |
| 818 | lua_pushcclosure(m_pLS, (lua_CFunction)pThunk, 1); |
| 819 | SET_FUNCTION(m_pLS, -3); |
| 820 | return true; |
| 821 | } |
| 822 | |
| 823 | bool CScriptObject::AddSetGetHandlers(SCRIPT_FUNCTION pSetThunk,SCRIPT_FUNCTION pGetThunk) |
| 824 | { |
no test coverage detected