mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 18:48:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/deprecation-fixes-for-spicy'
Merge adjustments: - Revert unneeded changes in mmdb_dir lookups to fix build - Fix deprecated EnumType::GetVal() to return +1 ref-count * origin/topic/timw/deprecation-fixes-for-spicy: Various deprecation fixes, reported by failed Spicy builds Add deprecated version of EnumType::GetVal() to returns EnumVal*, rename IntrusivePtr version to GetEnumVal
This commit is contained in:
commit
54c9f4a0e1
31 changed files with 246 additions and 206 deletions
|
@ -1330,7 +1330,7 @@ EnumType::enum_name_list EnumType::Names() const
|
|||
return n;
|
||||
}
|
||||
|
||||
const EnumValPtr& EnumType::GetVal(bro_int_t i)
|
||||
const EnumValPtr& EnumType::GetEnumVal(bro_int_t i)
|
||||
{
|
||||
auto it = vals.find(i);
|
||||
|
||||
|
@ -1343,6 +1343,13 @@ const EnumValPtr& EnumType::GetVal(bro_int_t i)
|
|||
return it->second;
|
||||
}
|
||||
|
||||
zeek::EnumVal* EnumType::GetVal(bro_int_t i)
|
||||
{
|
||||
auto rval = GetEnumVal(i).get();
|
||||
zeek::Ref(rval);
|
||||
return rval;
|
||||
}
|
||||
|
||||
void EnumType::DescribeReST(ODesc* d, bool roles_only) const
|
||||
{
|
||||
d->Add(":zeek:type:`enum`");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue