MCPcopy Create free account
hub / github.com/apple/foundationdb / loadClientFunction

Function loadClientFunction

fdbclient/MultiVersionTransaction.actor.cpp:724–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722// the function pointer will be set to nullptr.
723template <class T>
724void loadClientFunction(T* fp, void* lib, std::string libPath, const char* functionName, bool requireFunction) {
725 *(void**)(fp) = loadFunction(lib, functionName);
726 if (*fp == nullptr && requireFunction) {
727 TraceEvent(SevError, "ErrorLoadingFunction").detail("LibraryPath", libPath).detail("Function", functionName);
728 throw platform_error();
729 }
730}
731
732DLApi::DLApi(std::string fdbCPath, bool unlinkOnLoad)
733 : fdbCPath(fdbCPath), api(new FdbCApi()), unlinkOnLoad(unlinkOnLoad), networkSetup(false) {}

Callers 1

initMethod · 0.85

Calls 3

loadFunctionFunction · 0.85
TraceEventClass · 0.85
detailMethod · 0.80

Tested by

no test coverage detected