Merge remote-tracking branch 'origin/topic/timw/deprecation-cleanup'

Merge adjustments:
- Removed some stale str_split() references from docs
- Renumbered TypeTag enum comments
- Simplified test-case for @unload (don't need .bro files anymore)

* origin/topic/timw/deprecation-cleanup:
  Doc updates
  Fix language.init-in-anon-function btest due to changes to log filter predicates
  Remove deprecated log filter predicates for 4.1
  Remove Plugin::HookCallFunction and fix tests related to it
  Remove support for .bro script extension and BRO_ environment variables
  Remove deprecated ICMP events
  Remove some deprected methods/events from bif files
  Remove TYPE_COUNTER
  Remove all of the random single-file deprecations
  Remove all fully-deprecated files
  Update bifcl submodule to remove deprecations from generated code
This commit is contained in:
Jon Siwek 2021-01-29 16:37:56 -08:00
commit 1ca85f0221
322 changed files with 500 additions and 5697 deletions

View file

@ -326,7 +326,7 @@ zeek::Val* do_split(zeek::StringVal* str_val, zeek::RE_Matcher* re, int incl_sep
## Returns: An array of strings where each element corresponds to a substring
## in *str* separated by *re*.
##
## .. zeek:see:: split_string1 split_string_all split_string_n str_split
## .. zeek:see:: split_string1 split_string_all split_string_n
##
function split_string%(str: string, re: pattern%): string_vec
%{
@ -347,7 +347,7 @@ function split_string%(str: string, re: pattern%): string_vec
## second everything after *re*. An array of one string is returned
## when *s* cannot be split.
##
## .. zeek:see:: split_string split_string_all split_string_n str_split
## .. zeek:see:: split_string split_string_all split_string_n
function split_string1%(str: string, re: pattern%): string_vec
%{
return do_split_string(str, re, 0, 1);
@ -367,7 +367,7 @@ function split_string1%(str: string, re: pattern%): string_vec
## to a substring in *str* of the part not matching *re* (even-indexed)
## and the part that matches *re* (odd-indexed).
##
## .. zeek:see:: split_string split_string1 split_string_n str_split
## .. zeek:see:: split_string split_string1 split_string_n
function split_string_all%(str: string, re: pattern%): string_vec
%{
return do_split_string(str, re, 1, 0);
@ -392,7 +392,7 @@ function split_string_all%(str: string, re: pattern%): string_vec
## not matching *re* (even-indexed) and the part that matches *re*
## (odd-indexed).
##
## .. zeek:see:: split_string split_string1 split_string_all str_split
## .. zeek:see:: split_string split_string1 split_string_all
function split_string_n%(str: string, re: pattern,
incl_sep: bool, max_num_sep: count%): string_vec
%{
@ -700,45 +700,6 @@ function str_smith_waterman%(s1: string, s2: string, params: sw_params%) : sw_su
##
## s: The string to split.
##
## idx: The index vector (``vector of count``) with the cutting points.
##
## Returns: A one-indexed vector of strings.
##
## .. zeek:see:: split_string split_string1 split_string_all split_string_n
function str_split%(s: string, idx: index_vec%): string_vec &deprecated="Remove in v4.1. Use str_split_indices."
%{
auto idx_v = idx->As<VectorVal*>();
auto n = idx_v->Size();
zeek::String::IdxVec indices(n);
unsigned int i;
for ( i = 0; i < n; i++ )
indices[i] = idx_v->CountAt(i);
zeek::String::Vec* result = s->AsString()->Split(indices);
auto result_v = zeek::make_intrusive<zeek::VectorVal>(zeek::id::string_vec);
if ( result )
{
i = 1;
for ( zeek::String::VecIt it = result->begin();
it != result->end(); ++it, ++i )
result_v->Assign(i, zeek::make_intrusive<zeek::StringVal>(*it));
// StringVal now possesses string.
delete result;
}
return result_v;
%}
## Splits a string into substrings with the help of an index vector of cutting
## points. This differs from str_split() in that it does not return an empty element
## at the beginning of the result.
##
## s: The string to split.
##
## idx: The index vector (``vector of count``) with the cutting points
##
## Returns: A zero-indexed vector of strings.