Closed
Description
-
PR: gh-111545: Add Py_HashDouble() function python/cpython#112449
-
API:
int Py_HashDouble(double value, Py_hash_t *result)
- Set
*result
to the hash value and return 1 on success. - Set
*result
to 0 and return 0 if the hash value cannot be calculated. For example, if value is not-a-number (NaN). - result must not be
NULL
- Set
-
Stable ABI: compatible
-
Not added to the limited C API yet
UPDATE: I updated the API documation to address @zooba's suggestion (make the API more generic, be less specific about NaN case).
Voters:
- Guido Van Rossum @gvanrossum
- Irit Katriel @iritkatriel
- Steve Dower @zooba
- Petr Viktorin @encukou
Since I proposed this API and I'm part of the C API Working Group, I will not vote on this decision.
Metadata
Metadata
Assignees
Labels
No labels