]> granicus.if.org Git - python/commitdiff
Fix compilation warning in _ctypes module on Window
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Sun, 17 Oct 2010 08:34:22 +0000 (08:34 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Sun, 17 Oct 2010 08:34:22 +0000 (08:34 +0000)
Modules/_ctypes/libffi_msvc/ffi.c

index 65581a773fa5a466ba81c43b30c2114f7777d692..5df4ba4be502be942c4e7e8120cfa93466384535 100644 (file)
@@ -110,7 +110,7 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
       argp += z;
     }
 
-  if (argp - stack > ecif->cif->bytes) 
+  if (argp >= stack && (unsigned)(argp - stack) > ecif->cif->bytes) 
     {
       Py_FatalError("FFI BUG: not enough stack space for arguments");
     }