| 414 | } |
| 415 | |
| 416 | bool LoadPlugin(const std::string &path) { |
| 417 | void *handle = dlopen(path.c_str(), RTLD_NOW | RTLD_GLOBAL); |
| 418 | if (handle != nullptr) { |
| 419 | plugin_handles.emplace(path, handle); |
| 420 | return true; |
| 421 | } |
| 422 | return false; |
| 423 | } |
| 424 | |
| 425 | bool UnloadPlugin(const std::string &path) { |
| 426 | auto it = plugin_handles.find(path); |
no outgoing calls
no test coverage detected