Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix Sphinx syntax
  • Loading branch information
vstinner committed Dec 15, 2023
commit 67b4eb8c745c0fda6121d65a9470503663596576
24 changes: 13 additions & 11 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1282,17 +1282,19 @@ New Features
(Contributed by Victor Stinner in :gh:`111545`.)

* Add :c:func:`Py_HashDouble` function to hash a C double number. Existing code
using the private ``_Py_HashDouble()`` function can be updated to::

Py_hash_t hash_double(PyObject *obj, double value)
{
if (!Py_IS_NAN(value)) {
return Py_HashDouble(value);
}
else {
return Py_HashPointer(obj);
}
}
using the private ``_Py_HashDouble()`` function can be updated to:

.. code-block:: c

Py_hash_t hash_double(PyObject *obj, double value)
{
if (!Py_IS_NAN(value)) {
return Py_HashDouble(value);
}
else {
return Py_HashPointer(obj);
}
}

(Contributed by Victor Stinner in :gh:`111545`.)

Expand Down