Changeset 13865 in project


Ignore:
Timestamp:
03/23/09 08:54:34 (11 years ago)
Author:
Jim Ursetto
Message:

lru-cache: fix deleter call order

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/lru-cache/trunk/lru-cache.scm

    r13864 r13865  
    103103     (and-let* ((n (%lookup c k)))
    104104       (check-%node n)
     105       (when (%lru-cache-deleter c)
     106         ((%lru-cache-deleter c) k (%node-value n)))       
    105107       (hash-table-delete! (%lru-cache-ht c) k)
    106108       (when (eq? n (%lru-cache-tail c))
     
    111113             (pr (%node-prev n)))
    112114         (when pr (lru-node-next-set! pr nx))
    113          (when nx (lru-node-prev-set! nx pr)))
    114        (if (%lru-cache-deleter c)
    115            ((%lru-cache-deleter c) k (%node-value n))
    116            #t))))
     115         (when nx (lru-node-prev-set! nx pr))))))
    117116
    118117  (define (lru-cache-fold c kons knil)
Note: See TracChangeset for help on using the changeset viewer.