]> granicus.if.org Git - python/commitdiff
bpo-35947: Fix a compiler warning in _ctypes.c's StructUnionType_paramfunc(). (GH...
authorZackery Spytz <zspytz@gmail.com>
Sun, 31 Mar 2019 16:00:12 +0000 (10:00 -0600)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 31 Mar 2019 16:00:12 +0000 (19:00 +0300)
Modules/_ctypes/_ctypes.c

index 7479edaf1110630c01fc71d87ac1b52f9cdcf1ab..03f8e756092c8c6ccc4081132c5837cbd6c68460 100644 (file)
@@ -406,7 +406,7 @@ StructUnionType_paramfunc(CDataObject *self)
     CDataObject *copied_self;
     StgDictObject *stgdict;
 
-    if (self->b_size > sizeof(void*)) {
+    if ((size_t)self->b_size > sizeof(void*)) {
         void *new_ptr = PyMem_Malloc(self->b_size);
         if (new_ptr == NULL)
             return NULL;