Skip to content

Commit b2ecad5

Browse files
committed
fix signess (should be unsigned) of the return type for hash, was wrong defined in pandas-dev#39592
1 parent 1ff6970 commit b2ecad5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/_libs/src/klib/khash_python.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ Py_hash_t PANDAS_INLINE complexobject_hash(PyComplexObject* key) {
284284
}
285285

286286

287-
khint32_t PANDAS_INLINE kh_python_hash_func(PyObject* key);
287+
khuint32_t PANDAS_INLINE kh_python_hash_func(PyObject* key);
288288

289289
//we could use any hashing algorithm, this is the original CPython's for tuples
290290

@@ -325,7 +325,7 @@ Py_hash_t PANDAS_INLINE tupleobject_hash(PyTupleObject* key) {
325325
}
326326

327327

328-
khint32_t PANDAS_INLINE kh_python_hash_func(PyObject* key) {
328+
khuint32_t PANDAS_INLINE kh_python_hash_func(PyObject* key) {
329329
Py_hash_t hash;
330330
// For PyObject_Hash holds:
331331
// hash(0.0) == 0 == hash(-0.0)

0 commit comments

Comments
 (0)