mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
Rename BRO_DEPRECATED macro to ZEEK_DEPRECATED
This commit is contained in:
parent
dfed213f31
commit
d3927d9266
4 changed files with 20 additions and 16 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
2.6-378 | 2019-06-05 16:23:04 -0700
|
||||||
|
|
||||||
|
* Rename BRO_DEPRECATED macro to ZEEK_DEPRECATED (Jon Siwek, Corelight)
|
||||||
|
|
||||||
2.6-377 | 2019-06-05 16:15:58 -0700
|
2.6-377 | 2019-06-05 16:15:58 -0700
|
||||||
|
|
||||||
* Deprecate functions with "bro" in them. (Jon Siwek, Corelight)
|
* Deprecate functions with "bro" in them. (Jon Siwek, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.6-377
|
2.6-378
|
||||||
|
|
22
src/Val.h
22
src/Val.h
|
@ -87,7 +87,7 @@ typedef union {
|
||||||
|
|
||||||
class Val : public BroObj {
|
class Val : public BroObj {
|
||||||
public:
|
public:
|
||||||
BRO_DEPRECATED("use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
ZEEK_DEPRECATED("use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
||||||
Val(bool b, TypeTag t)
|
Val(bool b, TypeTag t)
|
||||||
{
|
{
|
||||||
val.int_val = b;
|
val.int_val = b;
|
||||||
|
@ -97,7 +97,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
BRO_DEPRECATED("use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
ZEEK_DEPRECATED("use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
||||||
Val(int32 i, TypeTag t)
|
Val(int32 i, TypeTag t)
|
||||||
{
|
{
|
||||||
val.int_val = bro_int_t(i);
|
val.int_val = bro_int_t(i);
|
||||||
|
@ -107,7 +107,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
BRO_DEPRECATED("use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
ZEEK_DEPRECATED("use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
||||||
Val(uint32 u, TypeTag t)
|
Val(uint32 u, TypeTag t)
|
||||||
{
|
{
|
||||||
val.uint_val = bro_uint_t(u);
|
val.uint_val = bro_uint_t(u);
|
||||||
|
@ -117,7 +117,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
BRO_DEPRECATED("use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
ZEEK_DEPRECATED("use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
||||||
Val(int64 i, TypeTag t)
|
Val(int64 i, TypeTag t)
|
||||||
{
|
{
|
||||||
val.int_val = i;
|
val.int_val = i;
|
||||||
|
@ -127,7 +127,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
BRO_DEPRECATED("use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
ZEEK_DEPRECATED("use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
||||||
Val(uint64 u, TypeTag t)
|
Val(uint64 u, TypeTag t)
|
||||||
{
|
{
|
||||||
val.uint_val = u;
|
val.uint_val = u;
|
||||||
|
@ -454,15 +454,15 @@ protected:
|
||||||
class PortManager {
|
class PortManager {
|
||||||
public:
|
public:
|
||||||
// Port number given in host order.
|
// Port number given in host order.
|
||||||
BRO_DEPRECATED("use val_mgr->GetPort() instead")
|
ZEEK_DEPRECATED("use val_mgr->GetPort() instead")
|
||||||
PortVal* Get(uint32 port_num, TransportProto port_type) const;
|
PortVal* Get(uint32 port_num, TransportProto port_type) const;
|
||||||
|
|
||||||
// Host-order port number already masked with port space protocol mask.
|
// Host-order port number already masked with port space protocol mask.
|
||||||
BRO_DEPRECATED("use val_mgr->GetPort() instead")
|
ZEEK_DEPRECATED("use val_mgr->GetPort() instead")
|
||||||
PortVal* Get(uint32 port_num) const;
|
PortVal* Get(uint32 port_num) const;
|
||||||
|
|
||||||
// Returns a masked port number
|
// Returns a masked port number
|
||||||
BRO_DEPRECATED("use PortVal::Mask() instead")
|
ZEEK_DEPRECATED("use PortVal::Mask() instead")
|
||||||
uint32 Mask(uint32 port_num, TransportProto port_type) const;
|
uint32 Mask(uint32 port_num, TransportProto port_type) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -619,11 +619,11 @@ protected:
|
||||||
class PortVal : public Val {
|
class PortVal : public Val {
|
||||||
public:
|
public:
|
||||||
// Port number given in host order.
|
// Port number given in host order.
|
||||||
BRO_DEPRECATED("use val_mgr->GetPort() instead")
|
ZEEK_DEPRECATED("use val_mgr->GetPort() instead")
|
||||||
PortVal(uint32 p, TransportProto port_type);
|
PortVal(uint32 p, TransportProto port_type);
|
||||||
|
|
||||||
// Host-order port number already masked with port space protocol mask.
|
// Host-order port number already masked with port space protocol mask.
|
||||||
BRO_DEPRECATED("use val_mgr->GetPort() instead")
|
ZEEK_DEPRECATED("use val_mgr->GetPort() instead")
|
||||||
explicit PortVal(uint32 p);
|
explicit PortVal(uint32 p);
|
||||||
|
|
||||||
Val* SizeVal() const override { return val_mgr->GetInt(val.uint_val); }
|
Val* SizeVal() const override { return val_mgr->GetInt(val.uint_val); }
|
||||||
|
@ -1120,7 +1120,7 @@ protected:
|
||||||
class EnumVal : public Val {
|
class EnumVal : public Val {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
BRO_DEPRECATED("use t->GetVal(i) instead")
|
ZEEK_DEPRECATED("use t->GetVal(i) instead")
|
||||||
EnumVal(int i, EnumType* t) : Val(t)
|
EnumVal(int i, EnumType* t) : Val(t)
|
||||||
{
|
{
|
||||||
val.int_val = i;
|
val.int_val = i;
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
#define util_h
|
#define util_h
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define BRO_DEPRECATED(msg) __attribute__ ((deprecated(msg)))
|
#define ZEEK_DEPRECATED(msg) __attribute__ ((deprecated(msg)))
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define BRO_DEPRECATED(msg) __declspec(deprecated(msg)) func
|
#define ZEEK_DEPRECATED(msg) __declspec(deprecated(msg)) func
|
||||||
#else
|
#else
|
||||||
#pragma message("Warning: BRO_DEPRECATED macro not implemented")
|
#pragma message("Warning: ZEEK_DEPRECATED macro not implemented")
|
||||||
#define BRO_DEPRECATED(msg)
|
#define ZEEK_DEPRECATED(msg)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Expose C99 functionality from inttypes.h, which would otherwise not be
|
// Expose C99 functionality from inttypes.h, which would otherwise not be
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue