1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-06 04:00:08 +00:00

Removed the PlatformUtilities class and moved its functions to more sensible classes - see forum post for more details.

This commit is contained in:
Julian Storer 2011-06-29 14:39:37 +01:00
parent 7c1bfffe0b
commit 94a0bf1af1
77 changed files with 1620 additions and 1369 deletions

View file

@ -111,23 +111,22 @@ void Process::lowerPrivilege()
}
}
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY
void* PlatformUtilities::loadDynamicLibrary (const String& name)
bool DynamicLibrary::open (const String& name)
{
return dlopen (name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
close();
handle = dlopen (name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
return handle != 0;
}
void PlatformUtilities::freeDynamicLibrary (void* handle)
void DynamicLibrary::close() noexcept
{
dlclose(handle);
if (handle != nullptr)
dlclose (handle);
}
void* PlatformUtilities::getProcedureEntryPoint (void* libraryHandle, const String& procedureName)
void* DynamicLibrary::getFunction (const String& functionName) noexcept
{
return dlsym (libraryHandle, procedureName.toUTF8());
return handle != nullptr ? dlsym (handle, functionName.toUTF8()) : nullptr;
}
#endif
#endif