Improved plugin version logging for Windows #4866

Conflicts:
	src/lib/arch/win32/ArchPluginWindows.cpp
This commit is contained in:
Nick Bolton
2015-07-23 18:02:05 -07:00
committed by Jerry (Xinyu Hou)
parent bfabd436d7
commit cb5f0f7b12
5 changed files with 53 additions and 27 deletions

View File

@@ -21,13 +21,13 @@
static const int kpluginCount = 1;
static const char kUnknownVersion[] = "unknown";
static const char* s_pluginNames[] = {"ns"};
static const char* s_pluginVersions[] = {"1.2"};
static const char* s_pluginNames[] = { "ns" };
static const char* s_pluginVersions[] = { "1.2" };
const char* pluginVersion(const char* pluginName)
const char* getExpectedPluginVersion(const char* name)
{
for (int i = 0; i < kpluginCount; i++) {
if (strcmp(pluginName, s_pluginNames[i]) == 0) {
if (strcmp(name, s_pluginNames[i]) == 0) {
return s_pluginVersions[i];
break;
}

View File

@@ -17,5 +17,8 @@
#pragma once
// return plugin version map
const char* pluginVersion(const char* pluginName);
//! Get expected plugin version
/*!
Returns the plugin version expected by the plugin loader.
*/
const char* getExpectedPluginVersion(const char* name);