Skip to content

Commit 091346f

Browse files
authored
Magic numbers for cmx and cmxa files (#118)
1 parent 0cc87aa commit 091346f

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

ocaml/utils/config.mlp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ and cmi_magic_number = "Caml1999I029"
9696
and cmo_magic_number = "Caml1999O029"
9797
and cma_magic_number = "Caml1999A029"
9898
and cmx_magic_number =
99-
if flambda then
100-
"Caml1999y029"
99+
if flambda || flambda2 then
100+
"Caml2021y029"
101101
else
102-
"Caml1999Y029"
102+
"Caml2021Y029"
103103
and cmxa_magic_number =
104-
if flambda then
105-
"Caml1999z029"
104+
if flambda || flambda2 then
105+
"Caml2021z029"
106106
else
107-
"Caml1999Z029"
107+
"Caml2021Z029"
108108
and ast_impl_magic_number = "Caml1999M029"
109109
and ast_intf_magic_number = "Caml1999N029"
110110
and cmxs_magic_number = "Caml1999D029"

ocaml/utils/misc.ml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -981,10 +981,10 @@ module Magic_number = struct
981981
| "Caml1999I" -> Some Cmi
982982
| "Caml1999O" -> Some Cmo
983983
| "Caml1999A" -> Some Cma
984-
| "Caml1999y" -> Some (Cmx {flambda = true})
985-
| "Caml1999Y" -> Some (Cmx {flambda = false})
986-
| "Caml1999z" -> Some (Cmxa {flambda = true})
987-
| "Caml1999Z" -> Some (Cmxa {flambda = false})
984+
| "Caml2021y" -> Some (Cmx {flambda = true})
985+
| "Caml2021Y" -> Some (Cmx {flambda = false})
986+
| "Caml2021z" -> Some (Cmxa {flambda = true})
987+
| "Caml2021Z" -> Some (Cmxa {flambda = false})
988988

989989
(* Caml2007D and Caml2012T were used instead of the common Caml1999 prefix
990990
between the introduction of those magic numbers and October 2017
@@ -1009,12 +1009,12 @@ module Magic_number = struct
10091009
| Cma -> "Caml1999A"
10101010
| Cmx config ->
10111011
if config.flambda
1012-
then "Caml1999y"
1013-
else "Caml1999Y"
1012+
then "Caml2021y"
1013+
else "Caml2021Y"
10141014
| Cmxa config ->
10151015
if config.flambda
1016-
then "Caml1999z"
1017-
else "Caml1999Z"
1016+
then "Caml2021z"
1017+
else "Caml2021Z"
10181018
| Cmxs -> "Caml1999D"
10191019
| Cmt -> "Caml1999T"
10201020
| Ast_impl -> "Caml1999M"

0 commit comments

Comments
 (0)