Skip to content

Commit

Permalink
Merge pull request #22354 from hannesm/lru-ocaml5
Browse files Browse the repository at this point in the history
add lru-0.3.0-1, which is lru 0.3.0 with a patch to be compatible with ocaml5
  • Loading branch information
mseri authored Oct 25, 2022
2 parents cfd4c8b + 161a838 commit c07cbf2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/lru/lru.0.3.0-1/files/hashtbl-seeded.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/lru.ml b/src/lru.ml
index 2484c24..98e6786 100644
--- a/src/lru.ml
+++ b/src/lru.ml
@@ -301,7 +301,7 @@ module M = struct
end

module SeededHash (H: Hashtbl.HashedType) = struct
- include H let hash _ x = hash x
+ include H let seeded_hash _ x = hash x
end

module Make (K: Hashtbl.HashedType) (V: Weighted) =
32 changes: 32 additions & 0 deletions packages/lru/lru.0.3.0-1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
opam-version: "2.0"
maintainer: "David Kaloper Meršinjak <dk505@cam.ac.uk>"
authors: ["David Kaloper Meršinjak <dk505@cam.ac.uk>"]
homepage: "https://github.com/pqwy/lru"
doc: "https://pqwy.github.io/lru/doc"
license: "ISC"
dev-repo: "git+https://github.com/pqwy/lru.git"
bug-reports: "https://github.com/pqwy/lru/issues"
synopsis: "Scalable LRU caches"
build: [ [ "dune" "subst" ] {dev}
[ "dune" "build" "-p" name "-j" jobs ]
[ "dune" "runtest" "-p" name ] {with-test} ]
depends: [
"ocaml" {>="5.0"}
"dune" {>= "1.7"}
"psq" {>="0.2.0"}
"qcheck-core" {with-test}
"qcheck-alcotest" {with-test}
"alcotest" {with-test}
]
description: """
Lru provides weight-bounded finite maps that can remove the least-recently-used
(LRU) bindings in order to maintain a weight constraint.
"""
url {
src: "https://github.com/pqwy/lru/releases/download/v0.3.0/lru-v0.3.0.tbz"
checksum: "md5=ecaa8c9f5f708879140961ce35bcdba4"
}
patches: ["hashtbl-seeded.patch"]
extra-files: [
["hashtbl-seeded.patch" "sha256=c3b749d802a7f1157af5e6096d66485bd19191bc33c0abd7c715dde0be9d8b22"]
]

0 comments on commit c07cbf2

Please sign in to comment.