mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Bro plugins should support a patch version (x.y.z)
This commit is contained in:
parent
35d0a4d38e
commit
615ff78282
31 changed files with 99 additions and 24 deletions
|
@ -69,16 +69,26 @@ extern const char* hook_name(HookType h);
|
|||
struct VersionNumber {
|
||||
int major; //< Major version number;
|
||||
int minor; //< Minor version number;
|
||||
int patch; //< Patch version number;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
VersionNumber() { major = minor = -1; }
|
||||
VersionNumber() {
|
||||
/**
|
||||
* Major and minor versions are required.
|
||||
*/
|
||||
major = minor = -1;
|
||||
/**
|
||||
* Patch version is optional, and set to 0 if not manually set.
|
||||
*/
|
||||
patch = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the version is set to a non-negative value.
|
||||
*/
|
||||
explicit operator bool() const { return major >= 0 && minor >= 0; }
|
||||
explicit operator bool() const { return major >= 0 && minor >= 0 && patch >= 0; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue