We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8449ffd commit 6e11c10Copy full SHA for 6e11c10
pandas/_libs/src/klib/khash_python.h
@@ -1,3 +1,4 @@
1
+#include <string.h>
2
#include <Python.h>
3
4
#include "khash.h"
@@ -14,7 +15,9 @@
14
15
// hash for 64 bit integers.
16
// GH 13436
17
khint64_t PANDAS_INLINE asint64(double key) {
- return *(khint64_t *)(&key);
18
+ khint64_t val;
19
+ memcpy(&val, &key, sizeof(double));
20
+ return val;
21
}
22
#define kh_float64_hash_func(key) (khint32_t)((asint64(key))>>33^(asint64(key))^(asint64(key))<<11)
23
#define kh_float64_hash_equal(a, b) ((a) == (b) || ((b) != (b) && (a) != (a)))
0 commit comments