summaryrefslogtreecommitdiff
path: root/py/misc.h
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2024-12-03 13:24:47 +0100
committerDamien George <damien@micropython.org>2024-12-10 11:30:59 +1100
commit0f7d68043fce3c305ad68cba06e4126628048f3e (patch)
treee282b86a5e6e849edc0b7c69aa6b17aa5436eb6e /py/misc.h
parent31a1e2b96decb9b5945461d808f725d40720d3c4 (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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/misc.h b/py/misc.h
index 8ac80bb7b..2629d0c46 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -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