Skip to content
Merged
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
Next Next commit
Enhance the doc
  • Loading branch information
vstinner committed Dec 5, 2023
commit 462c5e82a6bba125e2bf7409d75e694900518e48
3 changes: 2 additions & 1 deletion Doc/c-api/hash.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ See also the :c:member:`PyTypeObject.tp_hash` member.

.. c:function:: Py_hash_t Py_HashPointer(const void *ptr)

Hash a pointer.
Hash a pointer value: process the pointer value as an integer (cast it to
``uintptr_t`` internally). The pointer is not dereferenced.

The function cannot fail: it cannot return ``-1``.

Copy link
Member

@iritkatriel iritkatriel Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing some mention of the use case for this (not necessarily here). The issue talks about _Py_HashDouble, there is no mention of Py_HashPointer.

Expand Down