Skip to content

Commit 9d7dd21

Browse files
committed
remove caml_create_bytes
1 parent 029ded7 commit 9d7dd21

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

jscomp/core/lam_analysis.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ let rec no_side_effects (lam : Lam.t) : bool =
5656
(* non-observable side effect *)
5757
| "caml_sys_get_config"
5858
| "caml_sys_get_argv" (* should be fine *)
59-
60-
| "caml_create_string" (* TODO: add more *)
6159
| "caml_make_vect"
6260
| "caml_create_bytes"
6361
| "caml_obj_dup"

jscomp/stdlib-406/string.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
external length : string -> int = "%string_length"
2525
external get : string -> int -> char = "%string_safe_get"
2626
external set : bytes -> int -> char -> unit = "%bytes_safe_set"
27-
external create : int -> bytes = "caml_create_string"
27+
external create : int -> bytes = "caml_create_bytes"
2828
external unsafe_get : string -> int -> char = "%string_unsafe_get"
2929
external unsafe_set : bytes -> int -> char -> unit = "%bytes_unsafe_set"
3030
external unsafe_blit : string -> int -> bytes -> int -> int -> unit

jscomp/stdlib-406/string.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ external set : bytes -> int -> char -> unit = "%bytes_safe_set"
6868
6969
@deprecated This is a deprecated alias of {!Bytes.set}.[ ] *)
7070

71-
external create : int -> bytes = "caml_create_string"
71+
external create : int -> bytes = "caml_create_bytes"
7272
[@@ocaml.deprecated "Use Bytes.create instead."]
7373
(** [String.create n] returns a fresh byte sequence of length [n].
7474
The sequence is uninitialized and contains arbitrary bytes.

jscomp/stdlib-406/stringLabels.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ external set : bytes -> int -> char -> unit = "%bytes_safe_set"
3434
3535
@deprecated This is a deprecated alias of {!BytesLabels.set}. *)
3636

37-
external create : int -> bytes = "caml_create_string"
37+
external create : int -> bytes = "caml_create_bytes"
3838
[@@ocaml.deprecated "Use BytesLabels.create instead."]
3939
(** [String.create n] returns a fresh byte sequence of length [n].
4040
The sequence is uninitialized and contains arbitrary bytes.

0 commit comments

Comments
 (0)