oops
This commit is contained in:
parent
cd1a80e4e4
commit
9260acce31
|
@ -11,15 +11,13 @@ namespace lucore {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return std::format("{}.dll", dllName);
|
return std::format("{}.dll", dllName);
|
||||||
#else
|
#else
|
||||||
return
|
return std::format("lib{}.so", dllName);
|
||||||
std::format("lib{}.so", dllName);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
Library* Library::Open(std::string_view dllname) {
|
Library* Library::Open(std::string_view dllname) {
|
||||||
return new Library(
|
return new Library(detail::OsOpenLibrary(FormatLibraryName(dllname).c_str()));
|
||||||
static_cast<void*>(detail::OsOpenLibrary(FormatLibraryName(dllname).c_str())));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Library::Loaded(std::string_view dllname) {
|
bool Library::Loaded(std::string_view dllname) {
|
||||||
|
@ -28,11 +26,11 @@ namespace lucore {
|
||||||
|
|
||||||
Library::~Library() {
|
Library::~Library() {
|
||||||
if(handle) {
|
if(handle) {
|
||||||
detail::OsFreeLibrary(static_cast<detail::OsLibraryHandle>(handle));
|
detail::OsFreeLibrary(handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void* Library::SymbolImpl(const char* symbolName) {
|
void* Library::SymbolImpl(const char* symbolName) {
|
||||||
return detail::OsLibrarySymbol(static_cast<detail::OsLibraryHandle>(handle), symbolName);
|
return detail::OsLibrarySymbol(handle, symbolName);
|
||||||
}
|
}
|
||||||
} // namespace lucore
|
} // namespace lucore
|
||||||
|
|
Loading…
Reference in New Issue