@@ -233,7 +233,8 @@ let undefined_location loc =
233233 [Const_base (Const_string (fname, None ));
234234 Const_base (Const_int line);
235235 Const_base (Const_int char )]))
236- let cstrs = (3 ,2 )
236+ let cstr_const = 3
237+ let cstr_non_const = 2
237238let init_shape modl =
238239 let add_name x id =
239240 if ! Config. bs_only then
@@ -258,9 +259,9 @@ let init_shape modl =
258259 let init_v =
259260 match Ctype. expand_head env ty with
260261 {desc = Tarrow (_ ,_ ,_ ,_ )} ->
261- Const_pointer (0 , Pt_constructor {name = " Function" ; cstrs })
262+ Const_pointer (0 , Pt_constructor {name = " Function" ; const = cstr_const; non_const = cstr_non_const })
262263 | {desc = Tconstr (p , _ , _ )} when Path. same p Predef. path_lazy_t ->
263- Const_pointer (1 , Pt_constructor {name = " Lazy" ; cstrs })
264+ Const_pointer (1 , Pt_constructor {name = " Lazy" ; const = cstr_const; non_const = cstr_non_const })
264265 | _ -> raise Not_found in
265266 (add_name init_v id) :: init_shape_struct env rem
266267 | Sig_value (_ , {val_kind =Val_prim _ } ) :: rem ->
@@ -278,7 +279,7 @@ let init_shape modl =
278279 | Sig_modtype (id , minfo ) :: rem ->
279280 init_shape_struct (Env. add_modtype id minfo env) rem
280281 | Sig_class (id ,_ ,_ ) :: rem ->
281- (add_name (Const_pointer (2 , Pt_constructor {name = " Class" ;cstrs })) id)
282+ (add_name (Const_pointer (2 , Pt_constructor {name = " Class" ;const = cstr_const; non_const = cstr_non_const })) id)
282283 :: init_shape_struct env rem
283284 | Sig_class_type _ :: rem ->
284285 init_shape_struct env rem
0 commit comments