mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Remove APIs that were explicitly deprecated to be removed in 3.1.
Special handling for bro_{init,done,script_loaded} events: if still used, they cause Zeek to abort at startup.
This commit is contained in:
parent
84b8ee3b06
commit
d0b206fa36
21 changed files with 29 additions and 273 deletions
26
src/List.h
26
src/List.h
|
@ -154,12 +154,6 @@ public:
|
|||
return max_entries;
|
||||
}
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: Use std::sort instead")
|
||||
void sort(list_cmp_func cmp_func)
|
||||
{
|
||||
qsort(entries, num_entries, sizeof(T), cmp_func);
|
||||
}
|
||||
|
||||
int MemoryAllocation() const
|
||||
{ return padded_sizeof(*this) + pad_size(max_entries * sizeof(T)); }
|
||||
|
||||
|
@ -174,7 +168,7 @@ public:
|
|||
++num_entries;
|
||||
entries[0] = a;
|
||||
}
|
||||
|
||||
|
||||
void push_back(const T& a)
|
||||
{
|
||||
if ( num_entries == max_entries )
|
||||
|
@ -182,19 +176,13 @@ public:
|
|||
|
||||
entries[num_entries++] = a;
|
||||
}
|
||||
|
||||
|
||||
void pop_front() { remove_nth(0); }
|
||||
void pop_back() { remove_nth(num_entries-1); }
|
||||
|
||||
T& front() { return entries[0]; }
|
||||
T& back() { return entries[num_entries-1]; }
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: Use push_front instead")
|
||||
void insert(const T& a) // add at head of list
|
||||
{
|
||||
push_front(a);
|
||||
}
|
||||
|
||||
// The append method is maintained for historical/compatibility reasons.
|
||||
// (It's commonly used in the event generation API)
|
||||
void append(const T& a) // add to end of list
|
||||
|
@ -229,16 +217,6 @@ public:
|
|||
return old_ent;
|
||||
}
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: Use back()/pop_back() instead")
|
||||
T get() // return and remove ent at end of list
|
||||
{
|
||||
assert(num_entries > 0);
|
||||
return entries[--num_entries];
|
||||
}
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: Use back() instead")
|
||||
T& last() { return back(); }
|
||||
|
||||
// Return 0 if ent is not in the list, ent otherwise.
|
||||
bool is_member(const T& a) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue