Skip to content

Commit

Permalink
cache: don't reject pl_cache_obj with custom allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 committed Nov 22, 2023
1 parent 2bdf99e commit 795600a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ static inline void pl_cache_str(pl_cache cache, uint64_t key, pl_str *str)
// Steal and insert a cache object
static inline void pl_cache_steal(pl_cache cache, pl_cache_obj *obj)
{
pl_assert(!obj->data || obj->free == pl_free);
obj->data = pl_steal(NULL, obj->data);
if (obj->free == pl_free)
obj->data = pl_steal(NULL, obj->data);
pl_cache_set(cache, obj);
}

Expand Down

0 comments on commit 795600a

Please sign in to comment.