Tildes back in ~random parameter in Hashtbl.create

master
John Whitington 2020-08-03 13:01:33 +01:00
parent 0af3a1a805
commit 13965773ed
4 changed files with 16 additions and 16 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"