Skip to content

Commit 8269d05

Browse files
committed
Limit "_BitScanForward" usage to Win64 because Win32 does not have "_BitScanForward64".
1 parent 9ae412d commit 8269d05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/quicktions.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ cdef extern from *:
115115
#define __Quicktions_trailing_zeros_ulong(x) __builtin_ctzg(x)
116116
#define __Quicktions_trailing_zeros_ullong(x) __builtin_ctzg(x)
117117
#endif
118-
#elif defined(_MSC_VER) && SIZEOF_INT == 4 && SIZEOF_LONG_LONG == 8
119-
/* Typical Windows config. */
118+
#elif defined(_MSC_VER) && defined(_WIN64) && SIZEOF_INT == 4 && SIZEOF_LONG_LONG == 8
119+
/* Typical Windows64 config (Win32 does not define "_BitScanForward64"). */
120120
#define __Quicktions_HAS_FAST_CTZ 1
121121
#pragma intrinsic(_BitScanForward, _BitScanForward64)
122122
static CYTHON_INLINE int __Quicktions_trailing_zeros_uint(uint32_t x) {

0 commit comments

Comments
 (0)