MCPcopy Create free account
hub / github.com/anjo76/angelscript / GetUserData

Method GetUserData

sdk/angelscript/source/as_module.cpp:169–188  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

167
168// interface
169void *asCModule::GetUserData(asPWORD type) const
170{
171 // There may be multiple threads reading, but when
172 // setting the user data nobody must be reading.
173 ACQUIRESHARED(m_engine->engineRWLock);
174
175 for( asUINT n = 0; n < m_userData.GetLength(); n += 2 )
176 {
177 if( m_userData[n] == type )
178 {
179 void *ud = reinterpret_cast<void*>(m_userData[n+1]);
180 RELEASESHARED(m_engine->engineRWLock);
181 return ud;
182 }
183 }
184
185 RELEASESHARED(m_engine->engineRWLock);
186
187 return 0;
188}
189
190// interface
191asIScriptEngine *asCModule::GetEngine() const

Callers 8

CallOnThinkMethod · 0.45
CallOnMessageMethod · 0.45
RestoreMethod · 0.45
CleanupUserDataMethod · 0.45
RestoreMethod · 0.45
CleanupUserDataMethod · 0.45
cleanContextFunction · 0.45
TestExecuteFunction · 0.45

Calls 1

GetLengthMethod · 0.45

Tested by 6

RestoreMethod · 0.36
CleanupUserDataMethod · 0.36
RestoreMethod · 0.36
CleanupUserDataMethod · 0.36
cleanContextFunction · 0.36
TestExecuteFunction · 0.36