Commit 8b8bf90b authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: remove warning

parent 295eeaa1
......@@ -359,10 +359,14 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
DynamicLoader::LibraryHandle lib, const char* sym)
void* result = dlsym(lib, sym);
// Hack to cast pointer-to-data to pointer-to-function.
return *reinterpret_cast<DynamicLoader::SymbolPointer*>(&result);
void* pvoid;
DynamicLoader::SymbolPointer psym;
} result;
result.pvoid = dlsym(lib, sym);
return result.psym;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment