[Python-modules-commits] r21164 - in packages/numpy/trunk/debian (3 files)
morph at users.alioth.debian.org
morph at users.alioth.debian.org
Tue Apr 10 21:00:22 UTC 2012
Date: Tuesday, April 10, 2012 @ 21:00:20
Author: morph
Revision: 21164
* debian/patches/30_fix_unicode_mgmt_py27-32.patch
- fix Unicode object management with Python 2.7 and 3.2; thanks to Julian
Taylor for the report; Closes: #664672
Added:
packages/numpy/trunk/debian/patches/30_fix_unicode_mgmt_py27-32.patch
Modified:
packages/numpy/trunk/debian/changelog
packages/numpy/trunk/debian/patches/series
Modified: packages/numpy/trunk/debian/changelog
===================================================================
--- packages/numpy/trunk/debian/changelog 2012-04-10 18:44:42 UTC (rev 21163)
+++ packages/numpy/trunk/debian/changelog 2012-04-10 21:00:20 UTC (rev 21164)
@@ -1,3 +1,11 @@
+python-numpy (1:1.6.1-7) UNRELEASED; urgency=low
+
+ * debian/patches/30_fix_unicode_mgmt_py27-32.patch
+ - fix Unicode object management with Python 2.7 and 3.2; thanks to Julian
+ Taylor for the report; Closes: #664672
+
+ -- Sandro Tosi <morph at debian.org> Tue, 10 Apr 2012 22:58:33 +0200
+
python-numpy (1:1.6.1-6) experimental; urgency=low
[ Thomas Kluyver ]
Added: packages/numpy/trunk/debian/patches/30_fix_unicode_mgmt_py27-32.patch
===================================================================
--- packages/numpy/trunk/debian/patches/30_fix_unicode_mgmt_py27-32.patch (rev 0)
+++ packages/numpy/trunk/debian/patches/30_fix_unicode_mgmt_py27-32.patch 2012-04-10 21:00:20 UTC (rev 21164)
@@ -0,0 +1,49 @@
+Description: Fix Unicode object management with Python 2.7 and 3.2
+Author: Joseph Miessner
+Forwarded: not needed
+Origin: http://projects.scipy.org/numpy/ticket/1578#comment:17
+Index: python-numpy-1.6.1/numpy/core/src/multiarray/scalarapi.c
+===================================================================
+--- python-numpy-1.6.1.orig/numpy/core/src/multiarray/scalarapi.c 2011-07-20 20:25:28.000000000 +0200
++++ python-numpy-1.6.1/numpy/core/src/multiarray/scalarapi.c 2012-04-10 22:31:45.095578334 +0200
+@@ -698,7 +698,11 @@
+ #endif
+ /* Need an extra slot and need to use Python memory manager */
+ uni->str = NULL;
++#if PY_VERSION_HEX >= 0x02070000
++ destptr = PyObject_MALLOC(sizeof(Py_UNICODE)*(length+1));
++#else
+ destptr = PyMem_NEW(Py_UNICODE,length+1);
++#endif
+ if (destptr == NULL) {
+ Py_DECREF(obj);
+ return PyErr_NoMemory();
+Index: python-numpy-1.6.1/numpy/core/src/multiarray/ucsnarrow.c
+===================================================================
+--- python-numpy-1.6.1.orig/numpy/core/src/multiarray/ucsnarrow.c 2011-07-20 20:25:28.000000000 +0200
++++ python-numpy-1.6.1/numpy/core/src/multiarray/ucsnarrow.c 2012-04-10 22:34:00.791937442 +0200
+@@ -91,7 +91,11 @@
+ PyUnicodeObject *unicode;
+ unicode = PyObject_New(PyUnicodeObject, &PyUnicode_Type);
+ if (unicode == NULL) return NULL;
++#if PY_VERSION_HEX >= 0x02070000
++ unicode->str = PyObject_MALLOC(sizeof(Py_UNICODE)*(size_t)(length+1));
++#else
+ unicode->str = PyMem_NEW(Py_UNICODE, length+1);
++#endif
+ if (!unicode->str) {
+ _Py_ForgetReference((PyObject *)unicode);
+ PyObject_Del(unicode);
+@@ -114,7 +118,12 @@
+ void *oldstr;
+
+ oldstr = uni->str;
++#if PY_VERSION_HEX >= 0x02070000
++ uni->str = PyObject_REALLOC(uni->str,
++ sizeof(Py_UNICODE)*(size_t)(length+1));
++#else
+ PyMem_RESIZE(uni->str, Py_UNICODE, length+1);
++#endif
+ if (!uni->str) {
+ uni->str = oldstr;
+ PyErr_NoMemory();
Modified: packages/numpy/trunk/debian/patches/series
===================================================================
--- packages/numpy/trunk/debian/patches/series 2012-04-10 18:44:42 UTC (rev 21163)
+++ packages/numpy/trunk/debian/patches/series 2012-04-10 21:00:20 UTC (rev 21164)
@@ -4,3 +4,4 @@
#05_fix_endianness_detection.patch
10_use_local_python.org_object.inv_sphinx.diff
20_sphinx_1.1.2.diff
+30_fix_unicode_mgmt_py27-32.patch
More information about the Python-modules-commits
mailing list