Skip to content

Commit 26b8ab0

Browse files
committed
calculate_log2_keysize: use Windows implementation not just with MSVC
The inner loop of build_indices_generic() otherwise never stops since it gets a full dict and can never find a free slot.
1 parent 70b1f4d commit 26b8ab0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/dictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ calculate_log2_keysize(Py_ssize_t minsize)
582582
#if SIZEOF_LONG == SIZEOF_SIZE_T
583583
minsize = (minsize | PyDict_MINSIZE) - 1;
584584
return _Py_bit_length(minsize | (PyDict_MINSIZE-1));
585-
#elif defined(_MSC_VER)
585+
#elif defined(MS_WINDOWS)
586586
// On 64bit Windows, sizeof(long) == 4.
587587
minsize = (minsize | PyDict_MINSIZE) - 1;
588588
unsigned long msb;

0 commit comments

Comments
 (0)