At http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/trivial_python_compat

------------------------------------------------------------
revno: 3738
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
branch nick: trivial_python_compat
timestamp: Thu 2008-09-25 17:08:41 -0500
message:
  Bring the Py_ssize_t compatability code together.
=== modified file 'bzrlib/_patiencediff_c.c'
--- a/bzrlib/_patiencediff_c.c  2008-08-17 19:39:54 +0000
+++ b/bzrlib/_patiencediff_c.c  2008-09-25 22:08:41 +0000
@@ -27,13 +27,7 @@
 #include <string.h>
 #include <Python.h>
 
-
-/* http://www.python.org/dev/peps/pep-0353/ */
-#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
-typedef int Py_ssize_t;
-#define PY_SSIZE_T_MAX INT_MAX
-#define PY_SSIZE_T_MIN INT_MIN
-#endif
+#include "python-compat.h"
 
 
 #if defined(__GNUC__)

=== modified file 'bzrlib/python-compat.h'
--- a/bzrlib/python-compat.h    2008-09-24 04:15:03 +0000
+++ b/bzrlib/python-compat.h    2008-09-25 22:08:41 +0000
@@ -25,8 +25,9 @@
 #ifndef _BZR_PYTHON_COMPAT_H
 #define _BZR_PYTHON_COMPAT_H
 
-#if PY_VERSION_HEX < 0x02050000
-  typedef int Py_ssize_t;
+/* http://www.python.org/dev/peps/pep-0353/ */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+    typedef int Py_ssize_t;
     #define PY_SSIZE_T_MAX INT_MAX
     #define PY_SSIZE_T_MIN INT_MIN
     #define PyInt_FromSsize_t(z) PyInt_FromLong(z)

-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to