diff options
Diffstat (limited to 'lib/protocols/Handle.ml')
| -rw-r--r-- | lib/protocols/Handle.ml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/protocols/Handle.ml b/lib/protocols/Handle.ml index 9fd1f29..23af476 100644 --- a/lib/protocols/Handle.ml +++ b/lib/protocols/Handle.ml @@ -3,6 +3,7 @@ type protocol = .. class type obj = object method reference : bool method release : unit + method hash : Concepts.Hash.hash method protocols : protocol list end @@ -35,6 +36,9 @@ let copy handle = else None +let equal h1 h2 = + Concepts.Hash.hash_equals (object_of h1)#hash (object_of h2)#hash + let release ({ valid; _ } as handle) = let o = object_of handle in valid := false; |
