File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -284,5 +284,11 @@ module Cmo_format = struct
284
284
285
285
let force_link (t : t ) = t.cu_force_link
286
286
287
- let hints_pos (t : t ) = t.cu_hint
287
+ let hints_pos (t : t ) = t.cu_hint [@@ if ocaml_version > = (5 , 3 , 1 )]
288
+
289
+ let hints_size (t : t ) = t.cu_hintsize [@@ if ocaml_version > = (5 , 3 , 1 )]
290
+
291
+ let hints_size _ = 0 [@@ if ocaml_version < (5 , 3 , 1 )]
292
+
293
+ let hints_pos _ = 0 [@@ if ocaml_version < (5 , 3 , 1 )]
288
294
end
Original file line number Diff line number Diff line change @@ -75,4 +75,6 @@ module Cmo_format : sig
75
75
val imports : t -> (string * string option ) list
76
76
77
77
val hints_pos : t -> int
78
+
79
+ val hints_size : t -> int
78
80
end
Original file line number Diff line number Diff line change @@ -3196,7 +3196,7 @@ let from_cmo ?(includes = []) ?(include_cmis = false) ?(debug = false) compunit
3196
3196
Debug. read_event_list debug_data ~crcs: [] ~includes ~orig: 0 ic);
3197
3197
if times () then Format. eprintf " read debug events: %a@." Timer. print t;
3198
3198
let hints = Hints. create () in
3199
- if Ocaml_compiler.Cmo_format. hints_pos compunit < > 0
3199
+ if Ocaml_compiler.Cmo_format. hints_size compunit > 0
3200
3200
then (
3201
3201
seek_in ic (Ocaml_compiler.Cmo_format. hints_pos compunit);
3202
3202
Hints. read hints ~orig: 0 ic);
@@ -3221,7 +3221,7 @@ let from_cma ?(includes = []) ?(include_cmis = false) ?(debug = false) lib ic =
3221
3221
then (
3222
3222
seek_in ic compunit.Cmo_format. cu_debug;
3223
3223
Debug. read_event_list debug_data ~crcs: [] ~includes ~orig: ! orig ic);
3224
- if Ocaml_compiler.Cmo_format. hints_pos compunit < > 0
3224
+ if Ocaml_compiler.Cmo_format. hints_size compunit > 0
3225
3225
then (
3226
3226
seek_in ic (Ocaml_compiler.Cmo_format. hints_pos compunit);
3227
3227
Hints. read hints ~orig: ! orig ic);
You can’t perform that action at this time.
0 commit comments