Skip to content

Commit 48600c7

Browse files
ZackerySpytzserhiy-storchaka
authored andcommitted
bpo-35947: Fix a compiler warning in _ctypes.c's StructUnionType_paramfunc(). (GH-12629)
1 parent 79da388 commit 48600c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_ctypes/_ctypes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ StructUnionType_paramfunc(CDataObject *self)
406406
CDataObject *copied_self;
407407
StgDictObject *stgdict;
408408

409-
if (self->b_size > sizeof(void*)) {
409+
if ((size_t)self->b_size > sizeof(void*)) {
410410
void *new_ptr = PyMem_Malloc(self->b_size);
411411
if (new_ptr == NULL)
412412
return NULL;

0 commit comments

Comments
 (0)