py/misc: Fix msvc and C++ compatibility.

Use an explicit cast to suppress the implicit conversion which started
popping up in recent compiler versions (and wasn't there yet in 07bf3179).

Signed-off-by: stijn <stijn@ignitron.net>
This commit is contained in:
stijn
2024-12-03 13:24:47 +01:00
committed by Damien George
parent 31a1e2b96d
commit 0f7d68043f

View File

@@ -357,7 +357,7 @@ static inline uint32_t mp_clzll(unsigned long long x) {
// Microsoft don't ship _BitScanReverse64 on Win32, so emulate it
static inline uint32_t mp_clzll(unsigned long long x) {
unsigned long h = x >> 32;
return h ? mp_clzl(h) : (mp_clzl(x) + 32);
return h ? mp_clzl(h) : (mp_clzl((unsigned long)x) + 32);
}
#endif