Skip to content

Commit aabd97f

Browse files
committed
remove support Py_HASH_EXTERNAL for Unix platforms for now
1 parent f6c2c28 commit aabd97f

File tree

4 files changed

+4
-33
lines changed

4 files changed

+4
-33
lines changed

Doc/c-api/hash.rst

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,6 @@ See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`.
3232
which algorithm is used for hashing. The hash algorithm can be configured
3333
via the configure :option:`--with-hash-algorithm` option.
3434

35-
.. c:macro:: Py_HASH_EXTERNAL
36-
37-
If :c:macro:`Py_HASH_ALGORITHM` is set to that value, this means that
38-
the hash function is externally implemented, that is, embedders must
39-
provide a definition for ``extern PyHash_FuncDef PyHash_Func`` when
40-
building Python:
41-
42-
.. code-block:: c
43-
44-
static Py_hash_t
45-
my_siphash24(const void *src, Py_ssize_t src_sz) { ... }
46-
47-
PyHash_FuncDef PyHash_Func = {
48-
.hash = my_siphash24,
49-
.name = "my_siphash24",
50-
.hash_bits = 64,
51-
.seed_bits = 128,
52-
};
53-
54-
.. availability:: Unix
55-
5635
.. c:macro:: Py_HASH_CUTOFF
5736
5837
Buffers of length in range ``[1, Py_HASH_CUTOFF)`` are hashed using DJBX33A

Doc/using/configure.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -954,14 +954,13 @@ Libraries options
954954
Security Options
955955
----------------
956956

957-
.. option:: --with-hash-algorithm=[fnv|siphash13|siphash24|external]
957+
.. option:: --with-hash-algorithm=[fnv|siphash13|siphash24]
958958

959959
Select hash algorithm for use in ``Python/pyhash.c``:
960960

961961
* ``siphash13`` (default);
962962
* ``siphash24``;
963-
* ``fnv``;
964-
* ``external``.
963+
* ``fnv``.
965964

966965
.. versionadded:: 3.4
967966

configure

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3966,15 +3966,12 @@ dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
39663966
AC_ARG_WITH(
39673967
[hash_algorithm],
39683968
[AS_HELP_STRING(
3969-
[--with-hash-algorithm=@<:@fnv|siphash13|siphash24|external@:>@],
3969+
[--with-hash-algorithm=@<:@fnv|siphash13|siphash24@:>@],
39703970
[select hash algorithm for use in Python/pyhash.c (default is SipHash13)]
39713971
)],
39723972
[
39733973
AC_MSG_RESULT([$withval])
39743974
case "$withval" in
3975-
external)
3976-
AC_DEFINE([Py_HASH_ALGORITHM], [0])
3977-
;;
39783975
siphash13)
39793976
AC_DEFINE([Py_HASH_ALGORITHM], [3])
39803977
;;

0 commit comments

Comments
 (0)