| 23 | using DynamicLibraryHandle = void *; |
| 24 | #endif |
| 25 | |
| 26 | inline DynamicLibraryHandle open_dynamic_library(std::initializer_list<const char *> names) { |
| 27 | for (const char * name : names) { |
| 28 | #ifdef _WIN32 |
| 29 | DynamicLibraryHandle handle = LoadLibraryA(name); |
| 30 | #else |
| 31 | DynamicLibraryHandle handle = dlopen(name, RTLD_LAZY | RTLD_LOCAL); |
| 32 | #endif |
| 33 | if (handle != nullptr) { |
| 34 | return handle; |
| 35 | } |
| 36 | } |
| 37 | return nullptr; |
| 38 | } |
| 39 | |
| 40 | inline DynamicLibraryHandle open_dynamic_library(const std::string & name) { |
no outgoing calls
no test coverage detected