Table expiry now raises &on_change handlers

Expiry is remprted as ELEMENT_EXPIRED (which was newly introduced), to
allow distinction from table deletion.
This commit is contained in:
Johanna Amann 2020-02-05 12:37:52 -08:00
parent 7f9f66fce9
commit 18ab7838a9
5 changed files with 138 additions and 9 deletions

View file

@ -848,7 +848,7 @@ protected:
double CallExpireFunc(Val *idx);
// Enum for the different kinds of changes an &on_change handler can see
enum OnChangeType { element_new, element_changed, element_removed };
enum OnChangeType { element_new, element_changed, element_removed, element_expired };
// Calls &change_func. Does not take ownership of values. (Refs if needed).
void CallChangeFunc(const Val* index, Val* old_value, OnChangeType tpe);