]> granicus.if.org Git - python/commitdiff
Add a clause to the PY_FORMAT_SIZE_T to stop warnings on 32 bit intel
authorAnthony Baxter <anthonybaxter@gmail.com>
Sat, 1 Apr 2006 01:08:29 +0000 (01:08 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Sat, 1 Apr 2006 01:08:29 +0000 (01:08 +0000)
linux with gcc 4.0.2, after talking to Tim.
  <ymmit> But it won't break anything anywhere, so don't worry :-)

Include/pyport.h

index df97b999ac5af2dad09b7bc6835920cf8fb707aa..9b5c54d708ef2b695ea2ad3e78caae396586941f 100644 (file)
@@ -124,7 +124,9 @@ typedef Py_intptr_t Py_ssize_t;
  * Py_ssize_t on the platform.
  */
 #ifndef PY_FORMAT_SIZE_T
-#   if SIZEOF_SIZE_T == SIZEOF_LONG
+#   if SIZEOF_SIZE_T == SIZEOF_INT
+#       define PY_FORMAT_SIZE_T ""
+#   elif SIZEOF_SIZE_T == SIZEOF_LONG
 #       define PY_FORMAT_SIZE_T "l"
 #   elif defined(MS_WINDOWS)
 #       define PY_FORMAT_SIZE_T "I"