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 @@ -3134,7 +3134,7 @@ let from_cmo ?(includes = []) ?(include_cmis = false) ?(debug = false) compunit
3134
3134
Debug. read_event_list debug_data ~crcs: [] ~includes ~orig: 0 ic);
3135
3135
if times () then Format. eprintf " read debug events: %a@." Timer. print t;
3136
3136
let hints = Hints. create () in
3137
- if Ocaml_compiler.Cmo_format. hints_pos compunit < > 0
3137
+ if Ocaml_compiler.Cmo_format. hints_size compunit > 0
3138
3138
then (
3139
3139
seek_in ic (Ocaml_compiler.Cmo_format. hints_pos compunit);
3140
3140
Hints. read hints ~orig: 0 ic);
@@ -3159,7 +3159,7 @@ let from_cma ?(includes = []) ?(include_cmis = false) ?(debug = false) lib ic =
3159
3159
then (
3160
3160
seek_in ic compunit.Cmo_format. cu_debug;
3161
3161
Debug. read_event_list debug_data ~crcs: [] ~includes ~orig: ! orig ic);
3162
- if Ocaml_compiler.Cmo_format. hints_pos compunit < > 0
3162
+ if Ocaml_compiler.Cmo_format. hints_size compunit > 0
3163
3163
then (
3164
3164
seek_in ic (Ocaml_compiler.Cmo_format. hints_pos compunit);
3165
3165
Hints. read hints ~orig: ! orig ic);
You can’t perform that action at this time.
0 commit comments