bi: Add getter for user-visible library names
This commit is contained in:
parent
8ac2239ca1
commit
29d4da6ec4
2 changed files with 14 additions and 0 deletions
|
@ -195,6 +195,15 @@ const std::string& library_runtime_version(LIBRARY_ID lib)
|
|||
return versions.linked[lib];
|
||||
}
|
||||
|
||||
const std::string& library_name(LIBRARY_ID lib)
|
||||
{
|
||||
if(lib >= LIB_COUNT) {
|
||||
return empty_version;
|
||||
}
|
||||
|
||||
return versions.names[lib];
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
bool strlen_comparator(const std::string& a, const std::string& b)
|
||||
|
|
|
@ -48,6 +48,11 @@ const std::string& library_build_version(LIBRARY_ID lib);
|
|||
*/
|
||||
const std::string& library_runtime_version(LIBRARY_ID lib);
|
||||
|
||||
/**
|
||||
* Retrieve the user-visible name for the given library.
|
||||
*/
|
||||
const std::string& library_name(LIBRARY_ID lib);
|
||||
|
||||
/**
|
||||
* Produce a plain-text report of library versions suitable for stdout/stderr.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue