MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / Load

Method Load

src/Nazara/Core/Posix/DynLibImpl.cpp:41–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 }
40
41 bool DynLibImpl::Load(const String& libraryPath, String* errorMessage)
42 {
43 String path = libraryPath;
44
45 unsigned int pos = path.FindLast(".so");
46 if (pos == String::npos || (path.GetLength() > pos+3 && path[pos+3] != '.'))
47 path += ".so";
48
49 dlerror(); // Clear error flag
50 m_handle = dlopen(path.GetConstBuffer(), RTLD_LAZY | RTLD_GLOBAL);
51
52 if (m_handle)
53 return true;
54 else
55 {
56 *errorMessage = dlerror();
57 return false;
58 }
59 }
60
61 void DynLibImpl::Unload()
62 {

Callers

nothing calls this directly

Calls 3

FindLastMethod · 0.80
GetConstBufferMethod · 0.80
GetLengthMethod · 0.45

Tested by

no test coverage detected