mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Deprecate ID::AsType(), add ID::IsType() and ID::GetType()
This commit is contained in:
parent
f26904e031
commit
6e647416d5
10 changed files with 32 additions and 22 deletions
|
@ -1171,7 +1171,7 @@ IntrusivePtr<RecordVal> Supervisor::Node::ToRecord() const
|
|||
|
||||
static IntrusivePtr<Val> supervisor_role_to_cluster_node_type(BifEnum::Supervisor::ClusterRole role)
|
||||
{
|
||||
static auto node_type = global_scope()->Lookup("Cluster::NodeType")->AsType()->AsEnumType();
|
||||
static auto node_type = global_scope()->Lookup("Cluster::NodeType")->Type()->AsEnumType();
|
||||
|
||||
switch ( role ) {
|
||||
case BifEnum::Supervisor::LOGGER:
|
||||
|
@ -1192,7 +1192,7 @@ bool Supervisor::SupervisedNode::InitCluster() const
|
|||
if ( config.cluster.empty() )
|
||||
return false;
|
||||
|
||||
auto cluster_node_type = global_scope()->Lookup("Cluster::Node")->AsType()->AsRecordType();
|
||||
auto cluster_node_type = global_scope()->Lookup("Cluster::Node")->Type()->AsRecordType();
|
||||
auto cluster_nodes_id = global_scope()->Lookup("Cluster::nodes");
|
||||
auto cluster_manager_is_logger_id = global_scope()->Lookup("Cluster::manager_is_logger");
|
||||
auto cluster_nodes = cluster_nodes_id->ID_Val()->AsTableVal();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue