File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ module Obj : sig
61
61
(* The compiler ensures (|0) operation *)
62
62
external set_tag : t -> int -> unit = "tag" [@@ bs.set]
63
63
external repr : 'a -> t = "%identity"
64
+ external obj : t -> 'a = "%identity"
64
65
external magic : 'a -> 'b = "%identity"
65
66
external size : t -> int = "#obj_length"
66
67
end
Original file line number Diff line number Diff line change @@ -79,8 +79,6 @@ let unsafe_pop (q : 'a t) =
79
79
external ( +~ ) : nativeint -> nativeint -> nativeint =
80
80
" caml_int32_add"
81
81
82
- (* ATTENTION: refer {!Oo.id} *)
83
- external oo_id : Obj .t -> int = " %field1"
84
82
85
83
open Caml_hash_primitive
86
84
@@ -134,7 +132,8 @@ let caml_hash (count : int) _limit (seed : nativeint)
134
132
let obj_tag = Obj. tag obj in
135
133
let tag = (size lsl 10 ) lor obj_tag in
136
134
if tag = 248 (* Obj.object_tag*) then
137
- hash.contents < - caml_hash_mix_int hash.contents (Caml_nativeint_extern. of_int (oo_id obj))
135
+ hash.contents < - caml_hash_mix_int hash.contents
136
+ (Caml_nativeint_extern. of_int (Obj. obj (Obj. field obj 1 ) : int ))
138
137
else
139
138
begin
140
139
hash.contents < - caml_hash_mix_int hash.contents (Caml_nativeint_extern. of_int tag) ;
You can’t perform that action at this time.
0 commit comments