Skip to content

Commit 7bc0ceb

Browse files
Merge pull request #3 from Melissa0x1f992/use-bitsize-param
Reduce test field size to (2^31 - 1) to support 32 bit systems
2 parents 8994ad0 + db171e0 commit 7bc0ceb

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))]
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)