r1096 - in zodb/trunk/debian (3 files)

Fabio Tranchitella kobold at alioth.debian.org
Tue Dec 4 09:05:01 UTC 2007


    Date: Tuesday, December 4, 2007 @ 09:05:00
  Author: kobold
Revision: 1096

* debian/patches/python-zodb-x86_64.dpatch: Persistent and BTree modules
  don't work properly in x86_64. (Closes: #454196)

Added:
  zodb/trunk/debian/patches/00list
  zodb/trunk/debian/patches/python-zodb-x86_64.dpatch
Modified:
  zodb/trunk/debian/changelog

Modified: zodb/trunk/debian/changelog
===================================================================
--- zodb/trunk/debian/changelog	2007-12-04 03:02:46 UTC (rev 1095)
+++ zodb/trunk/debian/changelog	2007-12-04 09:05:00 UTC (rev 1096)
@@ -1,3 +1,10 @@
+zodb (3.6.0-7) unstable; urgency=low
+
+  * debian/patches/python-zodb-x86_64.dpatch: Persistent and BTree modules
+    don't work properly in x86_64. (Closes: #454196)
+
+ -- Fabio Tranchitella <kobold at debian.org>  Tue, 04 Dec 2007 09:52:47 +0100
+
 zodb (3.6.0-6) unstable; urgency=high
 
   * debian/control: conflict with zope3. (Closes: #411472)

Added: zodb/trunk/debian/patches/00list
===================================================================
--- zodb/trunk/debian/patches/00list	                        (rev 0)
+++ zodb/trunk/debian/patches/00list	2007-12-04 09:05:00 UTC (rev 1096)
@@ -0,0 +1 @@
+python-zodb-x86_64

Added: zodb/trunk/debian/patches/python-zodb-x86_64.dpatch
===================================================================
--- zodb/trunk/debian/patches/python-zodb-x86_64.dpatch	                        (rev 0)
+++ zodb/trunk/debian/patches/python-zodb-x86_64.dpatch	2007-12-04 09:05:00 UTC (rev 1096)
@@ -0,0 +1,441 @@
+#! /bin/sh -e
+
+. $(dirname $0)/DPATCH
+
+=== added file 'Dependencies/BTrees-ZODB3-3.6.0/BTrees/py24compat.h'
+--- zodb-3.6.0.orig/Dependencies/BTrees-ZODB3-3.6.0/BTrees/py24compat.h	1970-01-01 00:00:00 +0000
++++ zodb-3.6.0/Dependencies/BTrees-ZODB3-3.6.0/BTrees/py24compat.h	2007-12-01 12:26:34 +0000
+@@ -0,0 +1,11 @@
++/* Backport type definitions from Python 2.5's object.h */
++#ifndef BTREE_PY24COMPATH_H
++#define BTREE_PY24COMPAT_H
++#if PY_VERSION_HEX < 0x02050000
++typedef Py_ssize_t (*lenfunc)(PyObject *);
++typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t);
++typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t);
++typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *);
++typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
++#endif /* PY_VERSION_HEX */
++#endif /* BTREE_PY24COMPAT_H */
+
+=== added file 'Dependencies/persistent-ZODB3-3.6.0/persistent/py24compat.h'
+--- zodb-3.6.0.orig/Dependencies/persistent-ZODB3-3.6.0/persistent/py24compat.h	1970-01-01 00:00:00 +0000
++++ zodb-3.6.0/Dependencies/persistent-ZODB3-3.6.0/persistent/py24compat.h	2007-12-01 12:26:34 +0000
+@@ -0,0 +1,9 @@
++/* Backport type definitions from Python 2.5's object.h */
++#ifndef PERSISTENT_PY24COMPATH_H
++#define PERSISTENT_PY24COMPAT_H
++#if PY_VERSION_HEX < 0x02050000
++typedef int Py_ssize_t;
++#define PY_SSIZE_T_MAX INT_MAX
++#define PY_SSIZE_T_MIN INT_MIN
++#endif /* PY_VERSION_HEX */
++#endif /* PERSISTENT_PY24COMPAT_H */
+
+=== modified file 'Dependencies/BTrees-ZODB3-3.6.0/BTrees/BTreeItemsTemplate.c'
+--- zodb-3.6.0.orig/Dependencies/BTrees-ZODB3-3.6.0/BTrees/BTreeItemsTemplate.c	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/BTrees-ZODB3-3.6.0/BTrees/BTreeItemsTemplate.c	2007-12-01 12:26:34 +0000
+@@ -69,10 +69,10 @@
+   PyObject_DEL(self);
+ }
+ 
+-static int
++static Py_ssize_t
+ BTreeItems_length_or_nonzero(BTreeItems *self, int nonzero)
+ {
+-    int r;
++    Py_ssize_t r;
+     Bucket *b, *next;
+ 
+     b = self->firstbucket;
+@@ -111,8 +111,8 @@
+     return r >= 0 ? r : 0;
+ }
+ 
+-static int
+-BTreeItems_length( BTreeItems *self)
++static Py_ssize_t
++BTreeItems_length(BTreeItems *self)
+ {
+   return BTreeItems_length_or_nonzero(self, 0);
+ }
+@@ -132,7 +132,7 @@
+ ** self->currentbucket.
+ */
+ static int
+-BTreeItems_seek(BTreeItems *self, int i)
++BTreeItems_seek(BTreeItems *self, Py_ssize_t i)
+ {
+     int delta, pseudoindex, currentoffset;
+     Bucket *b, *currentbucket;
+@@ -285,7 +285,7 @@
+ **		(ie pulls the ith item out)
+ */
+ static PyObject *
+-BTreeItems_item(BTreeItems *self, int i)
++BTreeItems_item(BTreeItems *self, Py_ssize_t i)
+ {
+     PyObject *result;
+ 
+@@ -311,13 +311,13 @@
+ ** Returns:	BTreeItems item
+ */
+ static PyObject *
+-BTreeItems_slice(BTreeItems *self, int ilow, int ihigh)
++BTreeItems_slice(BTreeItems *self, Py_ssize_t ilow, Py_ssize_t ihigh)
+ {
+   Bucket *lowbucket;
+   Bucket *highbucket;
+   int lowoffset;
+   int highoffset;
+-  int length = -1;  /* len(self), but computed only if needed */
++  Py_ssize_t length = -1;  /* len(self), but computed only if needed */
+ 
+   /* Complications:
+    * A Python slice never raises IndexError, but BTreeItems_seek does.
+@@ -386,11 +386,11 @@
+ }
+ 
+ static PySequenceMethods BTreeItems_as_sequence = {
+-  (inquiry) BTreeItems_length,
++  (lenfunc) BTreeItems_length,
+   (binaryfunc)0,
+-  (intargfunc)0,
+-  (intargfunc) BTreeItems_item,
+-  (intintargfunc) BTreeItems_slice,
++  (ssizeargfunc)0,
++  (ssizeargfunc) BTreeItems_item,
++  (ssizessizeargfunc) BTreeItems_slice,
+ };
+ 
+ /* Number Method items (just for nb_nonzero!) */
+
+=== modified file 'Dependencies/BTrees-ZODB3-3.6.0/BTrees/BTreeModuleTemplate.c'
+--- zodb-3.6.0.orig/Dependencies/BTrees-ZODB3-3.6.0/BTrees/BTreeModuleTemplate.c	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/BTrees-ZODB3-3.6.0/BTrees/BTreeModuleTemplate.c	2007-12-01 12:26:34 +0000
+@@ -27,6 +27,8 @@
+ #define PER_ACCESSED(O) 1
+ #endif
+ 
++#include "py24compat.h"
++
+ /* So sue me.  This pair gets used all over the place, so much so that it
+  * interferes with understanding non-persistence parts of algorithms.
+  * PER_UNUSE can be used after a successul PER_USE or PER_USE_OR_RETURN.
+
+=== modified file 'Dependencies/BTrees-ZODB3-3.6.0/BTrees/BTreeTemplate.c'
+--- zodb-3.6.0.orig/Dependencies/BTrees-ZODB3-3.6.0/BTrees/BTreeTemplate.c	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/BTrees-ZODB3-3.6.0/BTrees/BTreeTemplate.c	2007-12-01 12:26:34 +0000
+@@ -1730,7 +1730,7 @@
+ }
+ 
+ /* forward declaration */
+-static int
++static Py_ssize_t
+ BTree_length_or_nonzero(BTree *self, int nonzero);
+ 
+ static PyObject *
+@@ -2062,7 +2062,7 @@
+  *          -1  error
+  *        >= 0  number of elements.
+  */
+-static int
++static Py_ssize_t
+ BTree_length_or_nonzero(BTree *self, int nonzero)
+ {
+     int result;
+@@ -2086,32 +2086,32 @@
+     return result;
+ }
+ 
+-static int
+-BTree_length( BTree *self)
++static Py_ssize_t
++BTree_length(BTree *self)
+ {
+   return BTree_length_or_nonzero(self, 0);
+ }
+ 
+ static PyMappingMethods BTree_as_mapping = {
+-  (inquiry)BTree_length,		/*mp_length*/
++  (lenfunc)BTree_length,		/*mp_length*/
+   (binaryfunc)BTree_get,		/*mp_subscript*/
+   (objobjargproc)BTree_setitem,	        /*mp_ass_subscript*/
+ };
+ 
+ static PySequenceMethods BTree_as_sequence = {
+-    (inquiry)0,                     /* sq_length */
++    (lenfunc)0,                     /* sq_length */
+     (binaryfunc)0,                  /* sq_concat */
+-    (intargfunc)0,                  /* sq_repeat */
+-    (intargfunc)0,                  /* sq_item */
+-    (intintargfunc)0,               /* sq_slice */
+-    (intobjargproc)0,               /* sq_ass_item */
+-    (intintobjargproc)0,            /* sq_ass_slice */
++    (ssizeargfunc)0,                /* sq_repeat */
++    (ssizeargfunc)0,                /* sq_item */
++    (ssizessizeargfunc)0,           /* sq_slice */
++    (ssizeobjargproc)0,             /* sq_ass_item */
++    (ssizessizeobjargproc)0,        /* sq_ass_slice */
+     (objobjproc)BTree_contains,     /* sq_contains */
+     0,                              /* sq_inplace_concat */
+     0,                              /* sq_inplace_repeat */
+ };
+ 
+-static int
++static Py_ssize_t
+ BTree_nonzero(BTree *self)
+ {
+   return BTree_length_or_nonzero(self, 1);
+
+=== modified file 'Dependencies/BTrees-ZODB3-3.6.0/BTrees/BucketTemplate.c'
+--- zodb-3.6.0.orig/Dependencies/BTrees-ZODB3-3.6.0/BTrees/BucketTemplate.c	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/BTrees-ZODB3-3.6.0/BTrees/BucketTemplate.c	2007-12-01 12:26:34 +0000
+@@ -1683,19 +1683,19 @@
+ }
+ 
+ static PyMappingMethods Bucket_as_mapping = {
+-  (inquiry)Bucket_length,		/*mp_length*/
++  (lenfunc)Bucket_length,		/*mp_length*/
+   (binaryfunc)bucket_getitem,		/*mp_subscript*/
+   (objobjargproc)bucket_setitem,	/*mp_ass_subscript*/
+ };
+ 
+ static PySequenceMethods Bucket_as_sequence = {
+-    (inquiry)0,                     /* sq_length */
++    (lenfunc)0,                     /* sq_length */
+     (binaryfunc)0,                  /* sq_concat */
+-    (intargfunc)0,                  /* sq_repeat */
+-    (intargfunc)0,                  /* sq_item */
+-    (intintargfunc)0,               /* sq_slice */
+-    (intobjargproc)0,               /* sq_ass_item */
+-    (intintobjargproc)0,            /* sq_ass_slice */
++    (ssizeargfunc)0,                /* sq_repeat */
++    (ssizeargfunc)0,                /* sq_item */
++    (ssizessizeargfunc)0,           /* sq_slice */
++    (ssizeobjargproc)0,             /* sq_ass_item */
++    (ssizessizeobjargproc)0,        /* sq_ass_slice */
+     (objobjproc)bucket_contains,    /* sq_contains */
+     0,                              /* sq_inplace_concat */
+     0,                              /* sq_inplace_repeat */
+
+=== modified file 'Dependencies/BTrees-ZODB3-3.6.0/BTrees/SetTemplate.c'
+--- zodb-3.6.0.orig/Dependencies/BTrees-ZODB3-3.6.0/BTrees/SetTemplate.c	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/BTrees-ZODB3-3.6.0/BTrees/SetTemplate.c	2007-12-01 12:26:34 +0000
+@@ -243,7 +243,7 @@
+   return NULL;
+ }
+ 
+-static int
++static Py_ssize_t
+ set_length(Bucket *self)
+ {
+   int r;
+@@ -256,7 +256,7 @@
+ }
+ 
+ static PyObject *
+-set_item(Bucket *self, int index)
++set_item(Bucket *self, Py_ssize_t index)
+ {
+   PyObject *r=0;
+ 
+@@ -274,16 +274,16 @@
+ }
+ 
+ static PySequenceMethods set_as_sequence = {
+-	(inquiry)set_length,		/* sq_length */
+-	(binaryfunc)0,                  /* sq_concat */
+-	(intargfunc)0,                  /* sq_repeat */
+-	(intargfunc)set_item,           /* sq_item */
+-	(intintargfunc)0,               /* sq_slice */
+-	(intobjargproc)0,               /* sq_ass_item */
+-	(intintobjargproc)0,            /* sq_ass_slice */
+-        (objobjproc)bucket_contains,    /* sq_contains */
+-        0,                              /* sq_inplace_concat */
+-        0,                              /* sq_inplace_repeat */
++  (lenfunc)set_length,            /* sq_length */
++  (binaryfunc)0,                  /* sq_concat */
++  (ssizeargfunc)0,                /* sq_repeat */
++  (ssizeargfunc)set_item,         /* sq_item */
++  (ssizessizeargfunc)0,           /* sq_slice */
++  (ssizeobjargproc)0,             /* sq_ass_item */
++  (ssizessizeobjargproc)0,        /* sq_ass_slice */
++  (objobjproc)bucket_contains,    /* sq_contains */
++  0,                              /* sq_inplace_concat */
++  0,                              /* sq_inplace_repeat */
+ };
+ 
+ static PyTypeObject SetType = {
+
+=== modified file 'Dependencies/BTrees-ZODB3-3.6.0/BTrees/TreeSetTemplate.c'
+--- zodb-3.6.0.orig/Dependencies/BTrees-ZODB3-3.6.0/BTrees/TreeSetTemplate.c	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/BTrees-ZODB3-3.6.0/BTrees/TreeSetTemplate.c	2007-12-01 12:26:34 +0000
+@@ -170,17 +170,17 @@
+ };
+ 
+ static PyMappingMethods TreeSet_as_mapping = {
+-  (inquiry)BTree_length,		/*mp_length*/
++  (lenfunc)BTree_length,	/*mp_length*/
+ };
+ 
+ static PySequenceMethods TreeSet_as_sequence = {
+-    (inquiry)0,                     /* sq_length */
++    (lenfunc)0,                     /* sq_length */
+     (binaryfunc)0,                  /* sq_concat */
+-    (intargfunc)0,                  /* sq_repeat */
+-    (intargfunc)0,                  /* sq_item */
+-    (intintargfunc)0,               /* sq_slice */
+-    (intobjargproc)0,               /* sq_ass_item */
+-    (intintobjargproc)0,            /* sq_ass_slice */
++    (ssizeargfunc)0,                /* sq_repeat */
++    (ssizeargfunc)0,                /* sq_item */
++    (ssizessizeargfunc)0,           /* sq_slice */
++    (ssizeobjargproc)0,             /* sq_ass_item */
++    (ssizessizeobjargproc)0,        /* sq_ass_slice */
+     (objobjproc)BTree_contains,     /* sq_contains */
+     0,                              /* sq_inplace_concat */
+     0,                              /* sq_inplace_repeat */
+
+=== modified file 'Dependencies/persistent-ZODB3-3.6.0/MANIFEST'
+--- zodb-3.6.0.orig/Dependencies/persistent-ZODB3-3.6.0/MANIFEST	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/persistent-ZODB3-3.6.0/MANIFEST	2007-12-01 12:26:34 +0000
+@@ -14,6 +14,7 @@
+ persistent/interfaces.py
+ persistent/README.txt
+ persistent/cPersistence.h
++persistent/py24compat.h
+ persistent/tests/persistenttestbase.py
+ persistent/tests/test_PickleCache.py
+ persistent/tests/test_list.py
+
+=== modified file 'Dependencies/persistent-ZODB3-3.6.0/persistent/SETUP.cfg'
+--- zodb-3.6.0.orig/Dependencies/persistent-ZODB3-3.6.0/persistent/SETUP.cfg	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/persistent-ZODB3-3.6.0/persistent/SETUP.cfg	2007-12-01 12:26:34 +0000
+@@ -11,6 +11,10 @@
+ #
+ header  ring.h
+ 
++# This is included by cPersistence.h, so all users of cPersistence.h
++# have to be able to include this indirectly.
++#
++header  py24compat.h
+ 
+ <extension cPersistence>
+   source     cPersistence.c
+@@ -18,6 +22,7 @@
+ 
+   depends-on cPersistence.h
+   depends-on ring.h
++  depends-on py24compat.h
+ </extension>
+ 
+ <extension cPickleCache>
+@@ -26,6 +31,7 @@
+ 
+   depends-on cPersistence.h
+   depends-on ring.h
++  depends-on py24compat.h
+ </extension>
+ 
+ <extension TimeStamp>
+
+=== modified file 'Dependencies/persistent-ZODB3-3.6.0/persistent/cPersistence.c'
+--- zodb-3.6.0.orig/Dependencies/persistent-ZODB3-3.6.0/persistent/cPersistence.c	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/persistent-ZODB3-3.6.0/persistent/cPersistence.c	2007-12-01 12:26:34 +0000
+@@ -300,7 +300,7 @@
+ {
+     PyObject *copy, *key, *value;
+     char *ckey;
+-    int pos = 0;
++    Py_ssize_t pos = 0;
+ 
+     copy = PyDict_New();
+     if (!copy)
+@@ -414,7 +414,7 @@
+ pickle_setattrs_from_dict(PyObject *self, PyObject *dict)
+ {
+     PyObject *key, *value;
+-    int pos = 0;
++    Py_ssize_t pos = 0;
+ 
+     if (!PyDict_Check(dict)) {
+ 	PyErr_SetString(PyExc_TypeError, "Expected dictionary");
+
+=== modified file 'Dependencies/persistent-ZODB3-3.6.0/persistent/cPersistence.h'
+--- zodb-3.6.0.orig/Dependencies/persistent-ZODB3-3.6.0/persistent/cPersistence.h	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/persistent-ZODB3-3.6.0/persistent/cPersistence.h	2007-12-01 12:26:34 +0000
+@@ -16,6 +16,8 @@
+ #define CPERSISTENCE_H
+ 
+ #include "Python.h"
++#include "py24compat.h"
++
+ #include "ring.h"
+ 
+ #define CACHE_HEAD \
+
+=== modified file 'Dependencies/persistent-ZODB3-3.6.0/persistent/cPickleCache.c'
+--- zodb-3.6.0.orig/Dependencies/persistent-ZODB3-3.6.0/persistent/cPickleCache.c	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/Dependencies/persistent-ZODB3-3.6.0/persistent/cPickleCache.c	2007-12-01 12:26:34 +0000
+@@ -378,7 +378,7 @@
+ cc_invalidate(ccobject *self, PyObject *inv)
+ {
+   PyObject *key, *v;
+-  int i = 0;
++  Py_ssize_t i = 0;
+ 
+   if (PyDict_Check(inv))
+     {
+@@ -448,7 +448,7 @@
+ cc_klass_items(ccobject *self)
+ {
+     PyObject *l,*k,*v;
+-    int p = 0;
++    Py_ssize_t p = 0;
+ 
+     l = PyList_New(0);
+     if (l == NULL)
+@@ -477,7 +477,7 @@
+ cc_debug_info(ccobject *self)
+ {
+     PyObject *l,*k,*v;
+-    int p = 0;
++    Py_ssize_t p = 0;
+ 
+     l = PyList_New(0);
+     if (l == NULL)
+@@ -707,7 +707,7 @@
+ static int
+ cc_clear(ccobject *self)
+ {
+-    int pos = 0;
++    Py_ssize_t pos = 0;
+     PyObject *k, *v;
+     /* Clearing the cache is delicate.
+ 
+
+=== modified file 'MANIFEST'
+--- zodb-3.6.0.orig/MANIFEST	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/MANIFEST	2007-12-01 12:26:34 +0000
+@@ -512,6 +512,7 @@
+ Dependencies/persistent-ZODB3-3.6.0/persistent/TimeStamp.c
+ Dependencies/persistent-ZODB3-3.6.0/persistent/DEPENDENCIES.cfg
+ Dependencies/persistent-ZODB3-3.6.0/persistent/ring.h
++Dependencies/persistent-ZODB3-3.6.0/persistent/py24compat.h
+ Dependencies/persistent-ZODB3-3.6.0/persistent/__init__.py
+ Dependencies/persistent-ZODB3-3.6.0/persistent/wref.py
+ Dependencies/persistent-ZODB3-3.6.0/persistent/SETUP.cfg
+
+=== modified file 'ZODB3/MANIFEST'
+--- zodb-3.6.0.orig/ZODB3/MANIFEST	2007-12-01 12:14:46 +0000
++++ zodb-3.6.0/ZODB3/MANIFEST	2007-12-01 12:26:34 +0000
+@@ -310,6 +310,7 @@
+ src/persistent/interfaces.py
+ src/persistent/list.py
+ src/persistent/mapping.py
++src/persistent/py24compat.h
+ src/persistent/ring.c
+ src/persistent/ring.h
+ src/persistent/wref.py
+


Property changes on: zodb/trunk/debian/patches/python-zodb-x86_64.dpatch
___________________________________________________________________
Name: svn:executable
   + *




More information about the pkg-zope-commits mailing list