MINOR: lru: Add the possibility to free data when an item is removed
Now, When a item is committed in an LRU tree, you can define a function to free
data owned by this item. This function will be called when the item is removed
from the LRU tree or when the tree is destroyed..
diff --git a/src/pattern.c b/src/pattern.c
index 656c190..9626c65 100644
--- a/src/pattern.c
+++ b/src/pattern.c
@@ -499,7 +499,7 @@
}
if (lru)
- lru64_commit(lru, ret, expr, expr->revision);
+ lru64_commit(lru, ret, expr, expr->revision, NULL);
return ret;
}
@@ -534,7 +534,7 @@
}
if (lru)
- lru64_commit(lru, ret, expr, expr->revision);
+ lru64_commit(lru, ret, expr, expr->revision, NULL);
return ret;
}
@@ -568,7 +568,7 @@
}
if (lru)
- lru64_commit(lru, ret, expr, expr->revision);
+ lru64_commit(lru, ret, expr, expr->revision, NULL);
return ret;
}
@@ -634,7 +634,7 @@
}
if (lru)
- lru64_commit(lru, ret, expr, expr->revision);
+ lru64_commit(lru, ret, expr, expr->revision, NULL);
return ret;
}
@@ -673,7 +673,7 @@
}
if (lru)
- lru64_commit(lru, ret, expr, expr->revision);
+ lru64_commit(lru, ret, expr, expr->revision, NULL);
return ret;
}
@@ -730,7 +730,7 @@
}
leave:
if (lru)
- lru64_commit(lru, ret, expr, expr->revision);
+ lru64_commit(lru, ret, expr, expr->revision, NULL);
return ret;
}