* PR: https://github.com/python/cpython/pull/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` * 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: * [x] Guido Van Rossum @gvanrossum * [x] Irit Katriel @iritkatriel * [x] Steve Dower @zooba * [x] 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.
PR: gh-111545: Add Py_HashDouble() function python/cpython#112449
API:
int Py_HashDouble(double value, Py_hash_t *result)*resultto the hash value and return 1 on success.*resultto 0 and return 0 if the hash value cannot be calculated. For example, if value is not-a-number (NaN).NULLStable 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:
Since I proposed this API and I'm part of the C API Working Group, I will not vote on this decision.