Skip to content

Commit d8a6f08

Browse files
Add test case for large fields
1 parent 0d21229 commit d8a6f08

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/test/test_ctypes/test_struct_fields.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ def __init_subclass__(cls, **kwargs):
7575
'ctypes state is not initialized'):
7676
class Subclass(BrokenStructure): ...
7777

78+
def test_gh126937(self):
79+
class X(self.cls):
80+
_fields_ = [('char', c_char),]
81+
class Y(self.cls):
82+
_fields_ = [('largeField', X * (2 ** 32))]
83+
7884
# __set__ and __get__ should raise a TypeError in case their self
7985
# argument is not a ctype instance.
8086
def test___set__(self):

0 commit comments

Comments
 (0)