diff options
author | stijn <stijn@ignitron.net> | 2024-12-03 13:24:47 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-12-10 11:30:59 +1100 |
commit | 0f7d68043fce3c305ad68cba06e4126628048f3e (patch) | |
tree | e282b86a5e6e849edc0b7c69aa6b17aa5436eb6e /py/misc.h | |
parent | 31a1e2b96decb9b5945461d808f725d40720d3c4 (diff) |
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>
Diffstat (limited to 'py/misc.h')
-rw-r--r-- | py/misc.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |