Skip to content

Commit

Permalink
refactor: specialize string functions for opam's parser string cache
Browse files Browse the repository at this point in the history
do not rely on polymorphic hashing/comparison for strings

Signed-off-by: Rudi Grinberg <[email protected]>

<!-- ps-id: 68015982-7cba-4890-9ca2-01449c47b17a -->
  • Loading branch information
rgrinberg committed Jan 19, 2025
1 parent 8e544a5 commit de1beb3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vendor/opam-file-format/opamLexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ let char_for_hexadecimal_code lexbuf i =
Char.chr (val1 * 16 + val2)

(* Some hash-consing for strings *)
module HS =
Weak.Make(struct include String let hash = Hashtbl.hash let equal = (=) end)
module HS = Weak.Make(String)
let hm = HS.create 317


Expand Down

0 comments on commit de1beb3

Please sign in to comment.