diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-09-03 02:23:27 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-09-03 02:23:51 +0000 |
| commit | 1259773fac4d7c334351c61ab8cf71231c1af4ef (patch) | |
| tree | 941d59334c04c1f4794ef16e4904cb7dafaa6b72 /lib/protocols/Handle.ml | |
| parent | cad153992e5ead450ae8245e518c6c88fe778ac1 (diff) | |
| download | RNT-1259773fac4d7c334351c61ab8cf71231c1af4ef.tar.gz RNT-1259773fac4d7c334351c61ab8cf71231c1af4ef.zip | |
Branch registration
Diffstat (limited to '')
| -rw-r--r-- | lib/protocols/Handle.ml | 2 | ||||
| -rw-r--r-- | lib/protocols/Handle.mli | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/protocols/Handle.ml b/lib/protocols/Handle.ml index 23af476..524386b 100644 --- a/lib/protocols/Handle.ml +++ b/lib/protocols/Handle.ml @@ -39,6 +39,8 @@ let copy handle = let equal h1 h2 = Concepts.Hash.hash_equals (object_of h1)#hash (object_of h2)#hash +let hash h = (object_of h)#hash + let release ({ valid; _ } as handle) = let o = object_of handle in valid := false; diff --git a/lib/protocols/Handle.mli b/lib/protocols/Handle.mli index fb93cdd..f36c95e 100644 --- a/lib/protocols/Handle.mli +++ b/lib/protocols/Handle.mli @@ -20,3 +20,5 @@ val invoke : 'a interface -> ('a -> 'b) -> 'b val copy : t -> t option val equal : t -> t -> bool val release : t -> unit + +val hash : t -> Concepts.Hash.hash |
