[Python-modules-commits] r7275 - in packages/python-pytc/trunk/debian (5 files)

vt-guest at users.alioth.debian.org vt-guest at users.alioth.debian.org
Mon Jan 5 22:11:08 UTC 2009


    Date: Monday, January 5, 2009 @ 22:11:07
  Author: vt-guest
Revision: 7275

New upstream release (0.7) - exactly the same as 0.6 + Debian patches

Modified:
  packages/python-pytc/trunk/debian/changelog
  packages/python-pytc/trunk/debian/patches/series
Deleted:
  packages/python-pytc/trunk/debian/patches/python2.4-compatibility
  packages/python-pytc/trunk/debian/patches/signed-byte
  packages/python-pytc/trunk/debian/patches/unnecessary-dependencies

Modified: packages/python-pytc/trunk/debian/changelog
===================================================================
--- packages/python-pytc/trunk/debian/changelog	2009-01-05 19:57:50 UTC (rev 7274)
+++ packages/python-pytc/trunk/debian/changelog	2009-01-05 22:11:07 UTC (rev 7275)
@@ -1,3 +1,9 @@
+python-pytc (0.7-1) UNRELEASED; urgency=low
+
+  * (NOT RELEASED YET) New upstream release
+
+ -- Vernon Tang <vt at foilhead.net>  Tue, 06 Jan 2009 05:57:58 +0800
+
 python-pytc (0.6-2) experimental; urgency=low
 
   * Initial release (Closes: #508822)

Deleted: packages/python-pytc/trunk/debian/patches/python2.4-compatibility
===================================================================
--- packages/python-pytc/trunk/debian/patches/python2.4-compatibility	2009-01-05 19:57:50 UTC (rev 7274)
+++ packages/python-pytc/trunk/debian/patches/python2.4-compatibility	2009-01-05 22:11:07 UTC (rev 7275)
@@ -1,17 +0,0 @@
-Fix build on python < 2.5.
-
-Index: pytc-0.6/pytc.c
-===================================================================
---- pytc-0.6.orig/pytc.c
-+++ pytc-0.6/pytc.c
-@@ -18,6 +18,10 @@
- #include <tcutil.h>
- #include <limits.h>
- 
-+#if PY_VERSION_HEX < 0x02050000
-+typedef inquiry lenfunc;
-+#endif
-+
- /* FIXME: handle error */
- /* FIXME: refactoring */
- /* FIXME: setcmpfunc tcbdbcmplexical/decimal/cmpint32/cmpint64' */

Modified: packages/python-pytc/trunk/debian/patches/series
===================================================================
--- packages/python-pytc/trunk/debian/patches/series	2009-01-05 19:57:50 UTC (rev 7274)
+++ packages/python-pytc/trunk/debian/patches/series	2009-01-05 22:11:07 UTC (rev 7275)
@@ -1,3 +0,0 @@
-signed-byte
-python2.4-compatibility
-unnecessary-dependencies

Deleted: packages/python-pytc/trunk/debian/patches/signed-byte
===================================================================
--- packages/python-pytc/trunk/debian/patches/signed-byte	2009-01-05 19:57:50 UTC (rev 7274)
+++ packages/python-pytc/trunk/debian/patches/signed-byte	2009-01-05 22:11:07 UTC (rev 7275)
@@ -1,85 +0,0 @@
-The optimize and tune methods of pytc.BDB and pytc.HDB can take negative
-values to their apow and fpow arguments. However, Python's bounds checking on
-the 'b' (byte) formatter prevents such values from actually being passed.
-
-This patch corrects the problem by implementing its own bounds checking on the
-affected arguments.
-
-Index: pytc-0.6/pytc.c
-===================================================================
---- pytc-0.6.orig/pytc.c
-+++ pytc-0.6/pytc.c
-@@ -16,6 +16,7 @@
- #include <tcbdb.h>
- #include <tchdb.h>
- #include <tcutil.h>
-+#include <limits.h>
- 
- /* FIXME: handle error */
- /* FIXME: refactoring */
-@@ -27,6 +28,21 @@
-   iter_item
- } itertype;
- 
-+static bool
-+char_bounds(short x) {
-+  if (x < SCHAR_MIN) {
-+    PyErr_SetString(PyExc_OverflowError,
-+    "signed byte integer is less than minimum");
-+    return false;
-+  } else if (x > SCHAR_MAX) {
-+    PyErr_SetString(PyExc_OverflowError,
-+    "signed byte integer is greater than maximum");
-+    return false;
-+  } else {
-+    return true;
-+  }
-+}
-+
- /* Error Objects */
- 
- static PyObject *PyTCError;
-@@ -510,15 +526,18 @@
-   static PyObject * \
-   a(PyTCHDB *self, PyObject *args, PyObject *keywds) { \
-     bool result; \
--    char apow, fpow; \
-+    short apow, fpow; \
-     PY_LONG_LONG bnum; \
-     unsigned char opts; \
-     static char *kwlist[] = {"bnum", "apow", "fpow", "opts", NULL}; \
-   \
--    if (!PyArg_ParseTupleAndKeywords(args, keywds, "LbbB:" #b, kwlist, \
-+    if (!PyArg_ParseTupleAndKeywords(args, keywds, "LhhB:" #b, kwlist, \
-                                      &bnum, &apow, &fpow, &opts)) { \
-       return NULL; \
-     } \
-+    if (!(char_bounds(apow) && char_bounds(fpow))) { \
-+      return NULL; \
-+    } \
-     Py_BEGIN_ALLOW_THREADS \
-     result = c(self->hdb, bnum, apow, fpow, opts); \
-     Py_END_ALLOW_THREADS \
-@@ -1238,17 +1257,20 @@
-   static PyObject * \
-   a(PyTCBDB *self, PyObject *args, PyObject *keywds) { \
-     bool result; \
--    char apow, fpow; \
-+    short apow, fpow; \
-     int lmemb, nmemb; \
-     PY_LONG_LONG bnum; \
-     unsigned char opts; \
-     static char *kwlist[] = {"lmemb", "nmemb", "bnum", "apow", "fpow", "opts", NULL}; \
-   \
--    if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiLbbB:" #b, kwlist, \
-+    if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiLhhB:" #b, kwlist, \
-                                      &lmemb, &nmemb, &bnum, \
-                                      &apow, &fpow, &opts)) { \
-       return NULL; \
-     } \
-+    if (!(char_bounds(apow) && char_bounds(fpow))) { \
-+      return NULL; \
-+    } \
-     Py_BEGIN_ALLOW_THREADS \
-     result = c(self->bdb, lmemb, nmemb, bnum, apow, fpow, opts); \
-     Py_END_ALLOW_THREADS \

Deleted: packages/python-pytc/trunk/debian/patches/unnecessary-dependencies
===================================================================
--- packages/python-pytc/trunk/debian/patches/unnecessary-dependencies	2009-01-05 19:57:50 UTC (rev 7274)
+++ packages/python-pytc/trunk/debian/patches/unnecessary-dependencies	2009-01-05 22:11:07 UTC (rev 7275)
@@ -1,15 +0,0 @@
-Remove unnecessary dependencies.
-
-Index: pytc-0.6/setup.py
-===================================================================
---- pytc-0.6.orig/setup.py
-+++ pytc-0.6/setup.py
-@@ -17,7 +17,7 @@
-   library_dirs.append('/sw/lib')
- 
- ext = Extension('pytc',
--                libraries = ['tokyocabinet', 'z', 'pthread', 'm', 'c'],
-+                libraries = ['tokyocabinet'],
-                 sources = ['pytc.c'],
-                 include_dirs = include_dirs,
-                 library_dirs = library_dirs,




More information about the Python-modules-commits mailing list