Skip to content

Commit db171e0

Browse files
Reduce test field size to (2^31 - 1) to support 32 bit systems
1 parent 7402a8f commit db171e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_ctypes/test_struct_fields.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ def test_gh126937(self):
7979
class X(self.cls):
8080
_fields_ = [('char', c_char),]
8181
class Y(self.cls):
82-
_fields_ = [('largeField', X * (2 ** 32 - 1))]
82+
# (2^31 - 1) is the largest size that can fit into a signed 32 bit int
83+
_fields_ = [('largeField', X * (2 ** 31 - 1))]
8384

8485
# __set__ and __get__ should raise a TypeError in case their self
8586
# argument is not a ctype instance.

0 commit comments

Comments
 (0)