Skip to content

Commit

Permalink
py/misc: Fix msvc and C++ compatibility.
Browse files Browse the repository at this point in the history
Use an explicit cast to suppress the implicit conversion which started
popping up in recent compiler versions (and wasn't there yet in 07bf317).

Signed-off-by: stijn <[email protected]>
  • Loading branch information
stinos authored and dpgeorge committed Dec 10, 2024
1 parent 31a1e2b commit 0f7d680
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0f7d680

Please sign in to comment.