diff --git a/stdlib/hashtbl.mli b/stdlib/hashtbl.mli index 00df561be..a2873b25e 100644 --- a/stdlib/hashtbl.mli +++ b/stdlib/hashtbl.mli @@ -35,11 +35,11 @@ val create : ?random: (* thwart tools/unlabel *) bool -> int -> ('a, 'b) t the table. The table grows as needed, so [n] is just an initial guess. - The optional [random] parameter (a boolean) controls whether + The optional [~][random] parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of [Hashtbl.create] or deterministic over all executions. - A hash table that is created with [random] set to [false] uses a + A hash table that is created with [~][random] set to [false] uses a fixed hash function ({!hash}) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other @@ -48,7 +48,7 @@ val create : ?random: (* thwart tools/unlabel *) bool -> int -> ('a, 'b) t denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down. - A hash table that is created with [random] set to [true] uses the seeded + A hash table that is created with [~][random] set to [true] uses the seeded hash function {!seeded_hash} with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among [2^{30}] different hash functions. All these hash @@ -58,12 +58,12 @@ val create : ?random: (* thwart tools/unlabel *) bool -> int -> ('a, 'b) t or {!iter} is no longer deterministic: elements are enumerated in different orders at different runs of the program. - If no [random] parameter is given, hash tables are created + If no [~][random] parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling {!randomize} or by setting the [R] flag in the [OCAMLRUNPARAM] environment variable. - @before 4.00.0 the [random] parameter was not present and all + @before 4.00.0 the [~][random] parameter was not present and all hash tables were created in non-randomized mode. *) val clear : ('a, 'b) t -> unit diff --git a/stdlib/moreLabels.mli b/stdlib/moreLabels.mli index b20750fb5..bfc70fb31 100644 --- a/stdlib/moreLabels.mli +++ b/stdlib/moreLabels.mli @@ -52,11 +52,11 @@ module Hashtbl : sig the table. The table grows as needed, so [n] is just an initial guess. - The optional [~random] parameter (a boolean) controls whether + The optional [~][random] parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of [Hashtbl.create] or deterministic over all executions. - A hash table that is created with [~random] set to [false] uses a + A hash table that is created with [~][random] set to [false] uses a fixed hash function ({!hash}) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other @@ -65,7 +65,7 @@ module Hashtbl : sig denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down. - A hash table that is created with [~random] set to [true] uses the seeded + A hash table that is created with [~][random] set to [true] uses the seeded hash function {!seeded_hash} with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among [2^{30}] different hash functions. All these hash @@ -75,12 +75,12 @@ module Hashtbl : sig or {!iter} is no longer deterministic: elements are enumerated in different orders at different runs of the program. - If no [~random] parameter is given, hash tables are created + If no [~][random] parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling {!randomize} or by setting the [R] flag in the [OCAMLRUNPARAM] environment variable. - @before 4.00.0 the [random] parameter was not present and all + @before 4.00.0 the [~][random] parameter was not present and all hash tables were created in non-randomized mode. *) val clear : ('a, 'b) t -> unit diff --git a/stdlib/templates/hashtbl.template.mli b/stdlib/templates/hashtbl.template.mli index bbb32b1a0..59c9dfc7f 100644 --- a/stdlib/templates/hashtbl.template.mli +++ b/stdlib/templates/hashtbl.template.mli @@ -35,11 +35,11 @@ val create : ?random: (* thwart tools/unlabel *) bool -> int -> ('a, 'b) t the table. The table grows as needed, so [n] is just an initial guess. - The optional [~random] parameter (a boolean) controls whether + The optional [~][random] parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of [Hashtbl.create] or deterministic over all executions. - A hash table that is created with [~random] set to [false] uses a + A hash table that is created with [~][random] set to [false] uses a fixed hash function ({!hash}) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other @@ -48,7 +48,7 @@ val create : ?random: (* thwart tools/unlabel *) bool -> int -> ('a, 'b) t denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down. - A hash table that is created with [~random] set to [true] uses the seeded + A hash table that is created with [~][random] set to [true] uses the seeded hash function {!seeded_hash} with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among [2^{30}] different hash functions. All these hash @@ -58,12 +58,12 @@ val create : ?random: (* thwart tools/unlabel *) bool -> int -> ('a, 'b) t or {!iter} is no longer deterministic: elements are enumerated in different orders at different runs of the program. - If no [~random] parameter is given, hash tables are created + If no [~][random] parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling {!randomize} or by setting the [R] flag in the [OCAMLRUNPARAM] environment variable. - @before 4.00.0 the [random] parameter was not present and all + @before 4.00.0 the [~][random] parameter was not present and all hash tables were created in non-randomized mode. *) val clear : ('a, 'b) t -> unit diff --git a/tools/unlabel b/tools/unlabel index 0c6c19a88..de43e145c 100755 --- a/tools/unlabel +++ b/tools/unlabel @@ -32,7 +32,7 @@ LABLABREGEX="s/\([a-z_]+:([a-z\('])/\(\1/g" #Remove a tilde if it is followed by a label name and a space or closing #OCamldoc code section with ] -TILDEREGEX="s/~([a-z_]*[ \]])/\1/g" +TILDEREGEX="s/~([a-z_]+[ \]])/\1/g" #@sinceunlabelednowarn --> @since SINCEREGEX="s/sinceunlabelednowarn/since/g"