Deprecate BRO_PLUGIN_API_VERSION, create zeek::PLUGIN_API_VERSION

This commit is contained in:
Tim Wojtulewicz 2022-06-29 11:11:17 -07:00
parent 1496b99a34
commit 99bc16073a
2 changed files with 13 additions and 6 deletions

View file

@ -12,10 +12,6 @@
#include "zeek/ZeekArgs.h"
#include "zeek/logging/WriterBackend.h"
// 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 7
#define BRO_PLUGIN_BRO_VERSION BRO_VERSION_FUNCTION
namespace zeek::threading
@ -26,6 +22,10 @@ struct Field;
namespace zeek
{
// 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.
constexpr int PLUGIN_API_VERSION = 7;
class ODesc;
class Event;
class Func;
@ -1158,3 +1158,8 @@ private:
} // namespace plugin
} // namespace zeek
// 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.
constexpr int BRO_PLUGIN_API_VERSION
[[deprecated("Remove in v6.1. Use zeek::PLUGIN_API_VERSION")]] = zeek::PLUGIN_API_VERSION;