]> granicus.if.org Git - python/commitdiff
Mostly revert this file to the same version as before. Only force setting
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 22 Sep 2006 08:47:23 +0000 (08:47 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 22 Sep 2006 08:47:23 +0000 (08:47 +0000)
of PY_FORMAT_SIZE_T to "l" for Mac OSX.  I don't know a better define
to use.  This should get rid of the warnings on other platforms and Mac too.

Include/pyport.h

index 16ee011272608a9031f6b30d7a2c4f6fe76757f3..8f8e514c349c633e4f65ee9888566196c8f0833e 100644 (file)
@@ -126,10 +126,10 @@ typedef Py_intptr_t       Py_ssize_t;
  * Py_ssize_t on the platform.
  */
 #ifndef PY_FORMAT_SIZE_T
-#   if SIZEOF_SIZE_T == SIZEOF_LONG
-#       define PY_FORMAT_SIZE_T "l"
-#   elif SIZEOF_SIZE_T == SIZEOF_INT
+#   if SIZEOF_SIZE_T == SIZEOF_INT && !defined(__APPLE__)
 #       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"
 #   else