mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Redoing the plugin versioning.
We now explicitly mark plugins as static vs dynamic (though we don't have the latter yet) instead of piggy-backing that on the version. Also, versions are now ignored for static plugins.
This commit is contained in:
parent
433c85540c
commit
cf9d65932c
3 changed files with 46 additions and 18 deletions
|
@ -10,19 +10,12 @@
|
|||
|
||||
#include "analyzer/Component.h"
|
||||
|
||||
/**
|
||||
* Place-holder API version for plugins compiled in statically.
|
||||
*/
|
||||
#define BRO_PLUGIN_VERSION_BUILTIN -1
|
||||
|
||||
/**
|
||||
* The current plugin API version. Plugins that won't match this version will
|
||||
* be rejected.
|
||||
*/
|
||||
#define BRO_PLUGIN_API_VERSION 1
|
||||
|
||||
#define _BRO_PLUGIN_VERSION_DEFAULT -1
|
||||
|
||||
/**
|
||||
* Starts the definition of a new plugin.
|
||||
*
|
||||
|
@ -40,8 +33,12 @@
|
|||
void InitPreScript() \
|
||||
{ \
|
||||
SetName(#_ns "::" #_name); \
|
||||
SetVersion(_BRO_PLUGIN_VERSION_DEFAULT);\
|
||||
SetAPIVersion(BRO_PLUGIN_API_VERSION);
|
||||
SetVersion(-1);\
|
||||
SetAPIVersion(BRO_PLUGIN_API_VERSION);\
|
||||
SetDynamicPlugin(false);
|
||||
// TODO: The SetDynamicPlugin() call is currently hardcoded to false. Change
|
||||
// once we have dynamic plugins as well.
|
||||
|
||||
|
||||
/**
|
||||
* Ends the definition of a plugin.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue