| 1729 | } |
| 1730 | |
| 1731 | USER_DATA CScriptSystem::CreateUserData(INT_PTR nVal,int nCookie) //AMD Port |
| 1732 | { |
| 1733 | Validate(); |
| 1734 | // UserDataMapItor itor=m_mapUserData.find(nVal); |
| 1735 | int nRef=0; |
| 1736 | // if(itor==m_mapUserData.end()) |
| 1737 | // { |
| 1738 | USER_DATA_CHUNK *pUDC=(USER_DATA_CHUNK *)lua_newuserdata(m_pLS,sizeof(USER_DATA_CHUNK)); |
| 1739 | pUDC->nVal=nVal; |
| 1740 | pUDC->nCookie=nCookie; |
| 1741 | |
| 1742 | lua_settag(m_pLS, m_nGCTag); |
| 1743 | pUDC->nRef=lua_ref(m_pLS,0); |
| 1744 | //m_mapUserData.insert(UserDataMapItor::value_type(nVal,nRef)); |
| 1745 | // } |
| 1746 | // else |
| 1747 | // { |
| 1748 | //::OutputDebugString("Reusing pointer\n"); |
| 1749 | //nRef=itor->second; |
| 1750 | // } |
| 1751 | Validate(); |
| 1752 | return pUDC->nRef; |
| 1753 | } |
| 1754 | ////////////////////////////////////////////////////////////////////// |
| 1755 | |
| 1756 | ////////////////////////////////////////////////////////////////////////// |
no test coverage detected