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:
Jon Siwek 2020-07-17 16:10:46 -07:00
commit 54c9f4a0e1
31 changed files with 246 additions and 206 deletions

View file

@ -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`");