|
15 | 15 |
|
16 | 16 | (* Byte sequence operations *)
|
17 | 17 |
|
18 |
| -external length : bytes -> int = "%string_length" |
| 18 | +external length : bytes -> int = "%bytes_length" |
19 | 19 | external string_length : string -> int = "%string_length"
|
20 |
| -external get : bytes -> int -> char = "%string_safe_get" |
21 |
| -external set : bytes -> int -> char -> unit = "%string_safe_set" |
22 |
| -external create : int -> bytes = "caml_create_string" |
23 |
| -external unsafe_get : bytes -> int -> char = "%string_unsafe_get" |
24 |
| -external unsafe_set : bytes -> int -> char -> unit = "%string_unsafe_set" |
| 20 | +external get : bytes -> int -> char = "%bytes_safe_get" |
| 21 | +external set : bytes -> int -> char -> unit = "%bytes_safe_set" |
| 22 | +external create : int -> bytes = "caml_create_bytes" |
| 23 | +external unsafe_get : bytes -> int -> char = "%bytes_unsafe_get" |
| 24 | +external unsafe_set : bytes -> int -> char -> unit = "%bytes_unsafe_set" |
25 | 25 | external unsafe_fill : bytes -> int -> int -> char -> unit
|
26 |
| - = "caml_fill_string" [@@noalloc] |
27 |
| -external unsafe_to_string : bytes -> string = "%identity" |
28 |
| -external unsafe_of_string : string -> bytes = "%identity" |
| 26 | + = "caml_fill_bytes" [@@noalloc] |
| 27 | +external unsafe_to_string : bytes -> string = "%bytes_to_string" |
| 28 | +external unsafe_of_string : string -> bytes = "%bytes_of_string" |
29 | 29 |
|
30 | 30 | external unsafe_blit : bytes -> int -> bytes -> int -> int -> unit
|
31 |
| - = "caml_blit_string" [@@noalloc] |
| 31 | + = "caml_blit_bytes" [@@noalloc] |
32 | 32 | external unsafe_blit_string : string -> int -> bytes -> int -> int -> unit
|
33 | 33 | = "caml_blit_string" [@@noalloc]
|
34 | 34 |
|
@@ -259,7 +259,7 @@ let rcontains_from s i c =
|
259 | 259 | type t = bytes
|
260 | 260 |
|
261 | 261 | let compare (x: t) (y: t) = Pervasives.compare x y
|
262 |
| -external equal : t -> t -> bool = "caml_string_equal" |
| 262 | +external equal : t -> t -> bool = "caml_bytes_equal" |
263 | 263 |
|
264 | 264 | (* Deprecated functions implemented via other deprecated functions *)
|
265 | 265 | [@@@ocaml.warning "-3"]
|
|
0 commit comments