Version 0.22 - 2026-12-03
  - delete() now accepts Iterators for either end of the range, as the
    SYNOPSIS already claimed, meaning the iterator's current node.  An
    iterator that reached the end is an error, since the range is inclusive.
  - Fix crashes and memory corruption:
    - Stepping an insertion-order iterator past its end, including during
      'each' on a tied hash with keys_in_recent_order, crashed.  Stepping it
      backward from the end now also starts from the correct end.
    - recent_limit => 0 freed newly inserted or looked-up nodes while still in
      use.  A limit of 0 now means nodes are never added to the recent list.
    - get_all with lookup_updates_recent could free values it was returning
      when recent_limit pruned the matching nodes.
    - Node->mark_oldest (or tree->oldest_node) on the node that was already
      oldest, or $node->older($node), corrupted the recent list.
    - Node->newer/older accepted a node from a different tree, corrupting both.
    - Setting Node->key on a node that was removed from the tree crashed.  It
      now dies with an error.
    - rekey could crash when a moved node collided with a node at the edge of
      the tree, and modified the wrong nodes when the min/max range contained
      no nodes or min was greater than max.
    - delete($node) and delete($node1, $node2) read uninitialized memory and
      did not delete the nodes.
    - Integer-key comparisons overflowed for keys far apart (e.g. near
      +/- 2**63), which mis-sorted them.
    - Calling ->new on an existing tree re-initialized it in place, corrupting
      its nodes.  It now dies with "Tree was already initialized".
    - A compare_fn callback during construction (with 'kv', 'keys' or
      'values') could cause reads of freed memory if it grew the Perl stack
      or modified the input arrays.
    - CMP_NUMSPLIT is no longer undefined behavior on non-ASCII bytes.
    - Perl code that runs in the middle of a tree operation could modify or
      free the tree while it was in use, corrupting memory.  This includes a
      compare_fn callback, overloaded stringification of keys, tied keys or
      values, and DESTROY of keys or values freed by the operation.  Now:
      - During a compare_fn callback or key stringification, any method call
        on the tree (or on its Nodes, or Iterator->delete) dies with an error.
        Reading Node attributes and stepping iterators are still permitted.
      - Tied keys and values are read once, before the operation begins.
      - Keys and values removed by an operation are freed after it completes.
  - Fix corruption on older perls compiled as C23 (e.g. gcc 15), where perl
    defines 'bool' as 'char': a node whose subtree count was a multiple of 256
    (such as the root of a 256-node tree) was treated as not being in the tree
    when deleted.
  - NaN is no longer accepted as a key of a KEY_TYPE_FLOAT tree (it can't be
    ordered, which broke lookups).  Using it as a key now dies, and rekey dies
    if 'offset' is NaN or infinite.
  - The 'recent' and 'hashiter' constructor attributes now reject "-", "+",
    and numbers out of integer range, instead of treating them as 0 or
    undefined behavior.
  - Fix 'put' on a tree with duplicate keys, which sometimes left some of
    the duplicates in place.  Also, duplicates created by changing Node->key
    or by 'rekey' were not always found by exists, get_all, or put.
  - The tree now keeps a copy of the compare_fn coderef, so reassigning the
    variable that was passed to the constructor no longer changes it.
  - Iterator->clone now keeps the direction of the original iterator.
    Previously the clone always iterated forward.
  - Deleting the current key during 'each' on a tied hash no longer skips the
    following key.
  - The 'recent' constructor attribute combined with a smaller recent_limit
    died with "BUG: access node[idx]" or tracked and removed the wrong nodes.
    The limit is now applied after the recent list is restored, keeping the
    newest nodes.
  - Storable freeze of a tree no longer resets an 'each' loop in progress on
    the tree object's hash.
  - rekey without 'offset' now always dies, instead of only when the min/max
    range contained nodes.
  - Fix _init_tree, which returned one less value than intended.
  - Fix Node::STORABLE_thaw returning its arguments in a rare case.
  - Fix delete($key) of a key not in the tree, which deleted the nodes on
    either side of where that key would be.
  - Fix tied scalars as keys, which were reported as undef until read once.
  - CMP_NUMSPLIT on overloaded objects now uses the UTF-8 flag of the
    stringified value.

Version 0.21 - 2026-06-27
  - Tree now holds strong reference to Node-wrapper objects, so once they are
    created (still lazily on demand) they remain until that node is deleted.
    This makes it possible to make weak references to Node objects.

Version 0.20 - 2025-12-17
  - Fixed bug where 'put' with allow_duplicates did not always replace all other
    nodes with identical keys
  - Node keys can now be altered, to re-key a node.
  - New tree attribute 'recent_limit' auto-prunes oldest nodes when collection
    grows past that limit.
  - New tree methods insert_as_node and put_as_node return Node objects for the
    just-inserted item.

Version 0.19 - 2025-04-11
  - New attribute 'keys_in_recent_order' changes behavior of convenience
    iteration methods, including for tied hashes.

Version 0.18 - 2025-03-22
  - New method 'rekey', for modifying existing keys by an offset
  - XS fix for passing hashref to constructor, previously would miss attributes

Version 0.17 - 2024-12-30
  - XS fix for crash in Node::STORABLE_thaw when ssize_t is 32 bit and IV is 64 bit.

Version 0.16 - 2024-12-28
  - Fix blatant bugs in constructor for handling single-argument compare fn
    or hashref, and add tests.
  - Fix foldcase on perl 5.14
  - Fix compilation errors and warnings on MSVC
  - Add alias 'key' for 'get_key'

Version 0.15 - 2024-12-27
  - New comparison functions CMP_FOLDCASE, CMP_NUMSPLIT_FOLDCASE,
     along with a new internal mechanism for applying a transformation
     function to incoming keys before comparing them.  Access to this API
     can be expanded in future versions.
  - Renamed comparison function CMP_UTF8 => CMP_STR, but old name still works
  - New methods keys, reverse_keys, values, reverse_values, kv, reverse_kv

Version 0.14 - 2024-08-17
  - Fix threaded perl support

Version 0.13 - 2024-08-16
  - Support for Storable freeze/thaw on trees and nodes (but not iterators)
  - More complete XS constructor is faster and allows more things to be
    initialized, including the "recent" list, and "keys" without values.
    Warns on unknown attribute names, now.
  - Fix null pointer bugs accessing certain attributes of pruned nodes
  - example "newest-files"
  - Documentation updates

Version 0.12 - 2024-07-09
  - Fix fatal bug in prev_inserted_trend optimization

Version 0.11 - 2024-07-09
  - New comparison flag GET_OR_ADD, inserts an empty node if one didn't exist
  - New get_key function returns nearest key to one requested.
  - New get shortcuts get_or_add, get_key_lt, get_key_le, get_key_gt, get_key_ge
  - Methods get, lookup, get_or_add, FETCH, and node method 'value' are now
     flagged as lvalue subs.
  - New exportable function 'cmp_numsplit' can be used independent of tree nodes

Version 0.10 - 2024-07-05
  - New method 'exists', takes list of keys and returns node count
  - New methods put_multi and insert_multi
  - Optimization for insertions of adjacent nodes, can build new tree
     in N+1 comparisons
  - New configuration attribute 'lookup_updates_recent' finishes the feature
     set needed for a typical LRU cache.
  - Constructor option 'kv' to initialize the tree
  - Fix bug when replacing multiple nodes with a 'put'

Version 0.09 - 2024-07-04
  - Fix XS bug in iter->next when iterating 'recent' and count > 1.
  - Count greater than INT_MAX passed to iter->next now returns all nodes
    instead of zero nodes.

Version 0.08 - 2024-07-02
  - New feature of insertion-order tracking:
     - Tree attributes: track_recent (and ctor option), newest_node,
        oldest_node, recent_count
     - Tree methods: iter_newer, iter_older, truncate_recent
     - Node attributes: newer, older, recent_tracked
     - Node methods: mark_newest, iter_newer, iter_older
  - Iterator attribute 'node'  (had 'key' and 'value', but not 'node'?)
  - Fix bug so iterators can be called as functions, as intended
  - Alias iterator methods for clearer singular usage
       'next_keys'   => 'next_key'
       'next_values' => 'next_value'

Version 0.07 - 2022-06-04

  - Actual fix for iter->next_kv, only affects debug perls - GitHub #2
  - Explicitly require Scalar::Util

Version 0.06 - 2022-05-22

  - Possible fix for bug in iter->next_kv

Version 0.05 - 2021-11-20

  - Implement hseek
  - Fix more bugs in utf8 comparisons (should be really fixed this time)
  - Fix compilation on 32-bit platforms
  - util/benchmark.pl compares performance with other similar modules

Version 0.03 - 2021-11-18

  - New XS iterators, with lots of new methods: clone, key, value, index,
     tree, next_kv, next_keys, next_values, step, delete.
  - Iterators now automatically move to the next item if the current node
     gets removed from the tree.
  - Iterators now hold a strong reference to the tree.
  - TIEHASH interface, for those who want it.
  - More unit tests, more documentation.
  - Fixed compilation on 5.12, 5.10, 5.8 at the cost of correct UTF-8 cmp.

Version 0.02 - 2021-11-15

  - New CMP_NUMSPLIT comparison function
  - New get_node shortcuts: get_node_last, get_node_le, get_node_le_last,
     get_node_lt, get_node_ge, get_node_gt.
  - Code cleanup
  - Minor documentation fixes

Version 0.01 - 2021-11-15

  - Finished implementing almost all methods of Tree::RB
  - Renamed option 'compat_list_context' to 'compat_list_get'
    since it only affected the 'get' method.
  - Add tree methods: root, iter, rev_iter
  - Add node methods: tree, left_leaf, right_leaf, strip, as_lol
    min, max, successor, predecessor

Version 0.00_03 - 2021-11-14

  - KEY_TYPE_USTR now uses a correct unicode comparison function.
  - Added option 'compat_array_context'
  - Comparison functions can now be specified by enum constants
  - Added api methods get_all, iter, rev_iter
  - Delete now takes a second optional param to delete a range
  - Renamed exported constants LU_* to GET_*, and added GET_LE_LAST
    and GET_EQ_LAST to handle common cases for duplicate keys.
  - More unit tests
  - Much more documentation

Version 0.00_02 - 2021-11-13

  - Enhanced string-key performance using KEY_TYPE_BSTR and
    KEY_TYPE_USTR.  KEY_TYPE_STR is removed.
  - Various distribution fixes, documentation, etc.

Version 0.00_01 - 2021-11-12

  - Initial release, with partial compatibility to Tree::RB
