[Python-modules-commits] r3666 - /packages/pyicu/trunk/debian/patches/64bit-fix.dpatch

bzed-guest at users.alioth.debian.org bzed-guest at users.alioth.debian.org
Sat Nov 17 23:44:25 UTC 2007


Author: bzed-guest
Date: Sat Nov 17 23:44:24 2007
New Revision: 3666

URL: http://svn.debian.org/wsvn/python-modules/?sc=1&rev=3666
Log:
patch update - we need 64bit ints

Modified:
    packages/pyicu/trunk/debian/patches/64bit-fix.dpatch

Modified: packages/pyicu/trunk/debian/patches/64bit-fix.dpatch
URL: http://svn.debian.org/wsvn/python-modules/packages/pyicu/trunk/debian/patches/64bit-fix.dpatch?rev=3666&op=diff
==============================================================================
--- packages/pyicu/trunk/debian/patches/64bit-fix.dpatch (original)
+++ packages/pyicu/trunk/debian/patches/64bit-fix.dpatch Sat Nov 17 23:44:24 2007
@@ -1,81 +1,66 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
 ## 64bit-fix.dpatch by Bernd Zeimetz <bernd at bzed.de>
 ##
-## DP: Fixing build on 64bit
+## DP: cast PY_LONG_LONG to int64_t where needed
 
 @DPATCH@
-diff -urNad pyicu~/bases.cpp pyicu/bases.cpp
---- pyicu~/bases.cpp	2007-02-07 22:57:39.000000000 +0100
-+++ pyicu/bases.cpp	2007-11-16 03:52:05.000000000 +0100
-@@ -1954,7 +1954,7 @@
- static PyObject *t_formattable_getInt64(t_formattable *self)
- {
-     UErrorCode status = U_ZERO_ERROR;
--    PY_LONG_LONG l = self->object->getInt64(status);
-+    Py_intptr_t l = self->object->getInt64(status);
- 
-     if (U_FAILURE(status))
-         return ICUException(status).reportError();
-@@ -2037,7 +2037,7 @@
- 
- static PyObject *t_formattable_setInt64(t_formattable *self, PyObject *arg)
- {
--    PY_LONG_LONG l;
-+    Py_intptr_t l;
-     
-     if (!parseArg(arg, "L", &l))
-     {
 diff -urNad pyicu~/common.cpp pyicu/common.cpp
 --- pyicu~/common.cpp	2007-02-07 22:57:39.000000000 +0100
-+++ pyicu/common.cpp	2007-11-16 03:52:05.000000000 +0100
-@@ -495,7 +495,7 @@
-     UDate date;
-     double d;
-     int i;
--    PY_LONG_LONG l;
-+    Py_intptr_t l;
-     icu::UnicodeString *u;
-     icu::UnicodeString _u;
-     char *s;
-@@ -828,7 +828,7 @@
-                 break;
-             return -1;
++++ pyicu/common.cpp	2007-11-18 00:33:50.000000000 +0100
+@@ -507,7 +507,7 @@
+         return new icu::Formattable(i);
  
--          case 'L':           /* PY_LONG_LONG */
-+          case 'L':           /* Py_intptr_t */
-             if (PyLong_Check(arg) || PyInt_Check(arg))
-                 break;
-             return -1;
-@@ -1009,9 +1009,9 @@
-               break;
-           }
+     if (!parseArg(arg, "L", &l))
+-        return new icu::Formattable(l);
++        return new icu::Formattable((int64_t)l);
  
--          case 'L':           /* PY_LONG_LONG */
-+          case 'L':           /* Py_intptr_t */
-           {
--              PY_LONG_LONG *l = va_arg(list, PY_LONG_LONG *);
-+              Py_intptr_t *l = va_arg(list, Py_intptr_t *);
-               *l = PyLong_AsLongLong(arg);
-               break;
-           }
+     if (!parseArg(arg, "c", &s))
+         return new icu::Formattable(s);
 diff -urNad pyicu~/numberformat.cpp pyicu/numberformat.cpp
---- pyicu~/numberformat.cpp	2006-04-13 19:41:51.000000000 +0200
-+++ pyicu/numberformat.cpp	2007-11-16 03:52:05.000000000 +0100
-@@ -482,7 +482,7 @@
-     icu::UnicodeString _u;
-     double d;
-     int i;
--    PY_LONG_LONG l;
-+    Py_intptr_t l;
-     icu::FieldPosition *fp;
- 
-     switch (PyTuple_Size(args)) {
-@@ -1654,7 +1654,7 @@
-     icu::UnicodeString _u, _v;
-     double d;
-     int i;
--    PY_LONG_LONG l;
-+    Py_intptr_t l;
-     icu::FieldPosition *fp;
- 
-     switch (PyTuple_Size(args)) {
+--- pyicu~/numberformat.cpp	2007-11-18 00:33:06.000000000 +0100
++++ pyicu/numberformat.cpp	2007-11-18 00:33:07.000000000 +0100
+@@ -499,7 +499,7 @@
+         }
+         if (!parseArgs(args, "L", &l))
+         {
+-            self->object->format(l, _u);
++            self->object->format((int64_t)l, _u);
+             return PyUnicode_FromUnicodeString(&_u);
+         }
+         break;
+@@ -519,7 +519,7 @@
+         if (!parseArgs(args, "LP", TYPE_CLASSID(FieldPosition),
+                        &l, &fp))
+         {
+-            self->object->format(l, _u, *fp);
++            self->object->format((int64_t)l, _u, *fp);
+             return PyUnicode_FromUnicodeString(&_u);
+         }
+         break;
+@@ -539,7 +539,7 @@
+         if (!parseArgs(args, "LUP", TYPE_CLASSID(FieldPosition),
+                        &l, &u, &fp))
+         {
+-            self->object->format(l, *u, *fp);
++            self->object->format((int64_t)l, *u, *fp);
+             Py_RETURN_ARG(args, 1);
+         }
+         break;
+@@ -1674,7 +1674,7 @@
+         if (!parseArgs(args, "LSP", TYPE_CLASSID(FieldPosition),
+                        &l, &u, &_u, &fp))
+         {
+-            STATUS_CALL(self->object->format(l, *u, _v, *fp, status));
++            STATUS_CALL(self->object->format((int64_t)l, *u, _v, *fp, status));
+             return PyUnicode_FromUnicodeString(&_v);
+         }
+       case 4:
+@@ -1693,7 +1693,7 @@
+         if (!parseArgs(args, "LSUP", TYPE_CLASSID(FieldPosition),
+                        &l, &u, &_u, &v, &fp))
+         {
+-            STATUS_CALL(self->object->format(l, *u, *v, *fp, status));
++            STATUS_CALL(self->object->format((int64_t)l, *u, *v, *fp, status));
+             Py_RETURN_ARG(args, 2);
+         }
+         break;




More information about the Python-modules-commits mailing list