mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Adding plugin API number into versioned function name, and removing
old runtime API version check.
This commit is contained in:
parent
8ae30d8aac
commit
78f8ff432f
6 changed files with 10 additions and 35 deletions
|
@ -13,10 +13,9 @@
|
|||
#include "iosource/Component.h"
|
||||
#include "logging/WriterBackend.h"
|
||||
|
||||
// We allow to override this externally for testing purposes.
|
||||
#ifndef BRO_PLUGIN_API_VERSION
|
||||
#define BRO_PLUGIN_API_VERSION 5
|
||||
#endif
|
||||
// Increase this when making incompatible changes to the plugin API. Note
|
||||
// that the constant is never used in C code. It's picked up on by CMake.
|
||||
#define BRO_PLUGIN_API_VERSION 6
|
||||
|
||||
#define BRO_PLUGIN_BRO_VERSION BRO_VERSION_FUNCTION
|
||||
|
||||
|
@ -103,14 +102,12 @@ public:
|
|||
|
||||
private:
|
||||
friend class Plugin;
|
||||
int api_version; // Current BRO_PLUGIN_API_VERSION. Automatically set.
|
||||
};
|
||||
|
||||
inline Configuration::Configuration()
|
||||
{
|
||||
name = "";
|
||||
description = "";
|
||||
api_version = BRO_PLUGIN_API_VERSION;
|
||||
bro_version = 0;
|
||||
}
|
||||
|
||||
|
@ -451,15 +448,6 @@ public:
|
|||
**/
|
||||
const std::string& PluginPath() const;
|
||||
|
||||
/**
|
||||
* Returns the internal version of the Bro API that this plugin
|
||||
* relies on. Only plugins that match Bro's current API version can
|
||||
* be used. For statically compiled plugins this is automatically the
|
||||
* case, but dynamically loaded plugins may cause a mismatch if they
|
||||
* were compiled for a different Bro version.
|
||||
*/
|
||||
int APIVersion() const;
|
||||
|
||||
/**
|
||||
* Returns a list of all components the plugin provides.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue