aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc
diff options
context:
space:
mode:
Diffstat (limited to 'erts/doc')
-rw-r--r--erts/doc/src/erl_nif.xml49
1 files changed, 35 insertions, 14 deletions
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 35c42ac517..53b6fdeaa1 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -813,6 +813,28 @@ typedef enum {
</item>
</taglist>
</item>
+ <tag><marker id="ErlNifHash"/><c>ErlNifHash</c></tag>
+ <item>
+ <p>An enumeration of the supported hash types that can be generated
+ using <seealso marker="#enif_hash"><c>enif_hash</c></seealso>.
+ </p>
+ <taglist>
+ <tag><c>ERL_NIF_INTERNAL_HASH</c></tag>
+ <item>
+ <p>Non-portable hash function that gives different hashes for the same Erlang
+ term depending on machine architecture and ERTS version.</p>
+ <p>Generated hash values within <c>0..2^32-1</c>.</p>
+ </item>
+ <tag><c>ERL_NIF_PHASH2</c></tag>
+ <item>
+ <p>Portable hash function that gives the same hash for the same Erlang term
+ regardless of machine architecture and ERTS version. Corresponds to
+ <seealso marker="erlang#phash2-1"><c>erlang:phash2/1</c></seealso>.</p>
+ <p>Slower than <c>ERL_NIF_INTERNAL_HASH.</c></p>
+ <p>Generated hash values within <c>0..2^27-1</c>.</p>
+ </item>
+ </taglist>
+ </item>
</taglist>
</section>
@@ -1387,6 +1409,19 @@ typedef enum {
</func>
<func>
+ <name>
+ <ret>unsigned long</ret>
+ <nametext>enif_hash(ErlNifHash type, ERL_NIF_TERM term)</nametext>
+ </name>
+ <fsummary>Hash terms.</fsummary>
+ <desc>
+ <p>Hash terms according to the specified
+ <seealso marker="#ErlNifHash"><c>ErlNifHash</c></seealso> type.</p>
+ <p>Range of returned value depends on the hash type.</p>
+ </desc>
+ </func>
+
+ <func>
<name><ret>int</ret><nametext>enif_inspect_binary(ErlNifEnv* env,
ERL_NIF_TERM bin_term, ErlNifBinary* bin)</nametext></name>
<fsummary>Inspect the content of a binary.</fsummary>
@@ -2370,20 +2405,6 @@ enif_map_iterator_destroy(env, &amp;iter);</code>
</func>
<func>
- <name>
- <ret>unsigned long</ret>
- <nametext>enif_phash2(ERL_NIF_TERM term)</nametext>
- </name>
- <fsummary>Portable hash function.</fsummary>
- <desc>
- <p>Portable hash function that gives the same hash for the same Erlang term
- regardless of machine architecture and ERTS version. Corresponds to
- <seealso marker="erlang#phash2-1"><c>erlang:phash2/1</c></seealso>.</p>
- <p>Returns an unsigned integer within <c>0..2^27-1</c>.</p>
- </desc>
- </func>
-
- <func>
<name><ret>int</ret><nametext>enif_port_command(ErlNifEnv* env, const
ErlNifPort* to_port, ErlNifEnv *msg_env, ERL_NIF_TERM msg)</nametext>
</name>