Protocol environment / Int32: update to 4.06.1

This commit is contained in:
bruno 2018-06-19 17:42:14 +02:00 committed by Benjamin Canou
parent 5e73ef8fea
commit f428af9b50

View File

@ -15,7 +15,7 @@
(* TEZOS CHANGES (* TEZOS CHANGES
* Import version 4.04.0 * Import version 4.06.1
* Remove deprecated functions * Remove deprecated functions
*) *)
@ -91,7 +91,7 @@ external logxor : int32 -> int32 -> int32 = "%int32_xor"
(** Bitwise logical exclusive or. *) (** Bitwise logical exclusive or. *)
val lognot : int32 -> int32 val lognot : int32 -> int32
(** Bitwise logical negation *) (** Bitwise logical negation. *)
external shift_left : int32 -> int -> int32 = "%int32_lsl" external shift_left : int32 -> int -> int32 = "%int32_lsl"
(** [Int32.shift_left x y] shifts [x] to the left by [y] bits. (** [Int32.shift_left x y] shifts [x] to the left by [y] bits.
@ -135,13 +135,26 @@ external to_float : int32 -> float
external of_string : string -> int32 = "caml_int32_of_string" external of_string : string -> int32 = "caml_int32_of_string"
(** Convert the given string to a 32-bit integer. (** Convert the given string to a 32-bit integer.
The string is read in decimal (by default) or in hexadecimal, The string is read in decimal (by default, or if the string
octal or binary if the string begins with [0x], [0o] or [0b] begins with [0u]) or in hexadecimal, octal or binary if the
respectively. string begins with [0x], [0o] or [0b] respectively.
Raise [Failure "int_of_string"] if the given string is not
The [0u] prefix reads the input as an unsigned integer in the range
[[0, 2*Int32.max_int+1]]. If the input exceeds {!Int32.max_int}
it is converted to the signed integer
[Int32.min_int + input - Int32.max_int - 1].
The [_] (underscore) character can appear anywhere in the string
and is ignored.
Raise [Failure "Int32.of_string"] if the given string is not
a valid representation of an integer, or if the integer represented a valid representation of an integer, or if the integer represented
exceeds the range of integers representable in type [int32]. *) exceeds the range of integers representable in type [int32]. *)
val of_string_opt: string -> int32 option
(** Same as [of_string], but return [None] instead of raising.
@since 4.05 *)
val to_string : int32 -> string val to_string : int32 -> string
(** Return the string representation of its argument, in signed decimal. *) (** Return the string representation of its argument, in signed decimal. *)
@ -173,4 +186,3 @@ val compare: t -> t -> int
val equal: t -> t -> bool val equal: t -> t -> bool
(** The equal function for int32s. (** The equal function for int32s.
@since 4.03.0 *) @since 4.03.0 *)