Rev 3738: (jam) combine the Py_ssize_t compatibility code together. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Sep 26 00:11:04 BST 2008


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3738
revision-id: pqm at pqm.ubuntu.com-20080925231101-586jot7uv08m41xo
parent: pqm at pqm.ubuntu.com-20080925075516-olnl5p5au2u1ml5v
parent: john at arbash-meinel.com-20080925220841-3kfmu3tjv5g97xc6
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2008-09-26 00:11:01 +0100
message:
  (jam) combine the Py_ssize_t compatibility code together.
modified:
  bzrlib/_patiencediff_c.c       _patiencediff_c.c-20070721205602-q3imkipwlgagp3cy-1
  bzrlib/python-compat.h         pythoncompat.h-20080924041409-9kvi0fgtuuqp743j-1
    ------------------------------------------------------------
    revno: 3737.1.1
    revision-id: john at arbash-meinel.com-20080925220841-3kfmu3tjv5g97xc6
    parent: pqm at pqm.ubuntu.com-20080925075516-olnl5p5au2u1ml5v
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: trivial_python_compat
    timestamp: Thu 2008-09-25 17:08:41 -0500
    message:
      Bring the Py_ssize_t compatability code together.
    modified:
      bzrlib/_patiencediff_c.c       _patiencediff_c.c-20070721205602-q3imkipwlgagp3cy-1
      bzrlib/python-compat.h         pythoncompat.h-20080924041409-9kvi0fgtuuqp743j-1
=== 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)




More information about the bazaar-commits mailing list