[odb-api] 02/19: fix patch

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Sep 1 13:18:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository odb-api.

commit 12bcbce0bc12dfa1a0c24b3b3f07cd50615510c7
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Wed Aug 30 16:35:34 2017 +0100

    fix patch
---
 debian/patches/py3-port.patch | 32 +++++++++++++++++++++++++++-----
 1 file changed, 27 insertions(+), 5 deletions(-)

diff --git a/debian/patches/py3-port.patch b/debian/patches/py3-port.patch
index 5c73450..8e283e2 100644
--- a/debian/patches/py3-port.patch
+++ b/debian/patches/py3-port.patch
@@ -7,18 +7,40 @@ Index: odb-api-0.17.1/odb_api/src/odb_api/IteratorProxy.h
 ===================================================================
 --- odb-api-0.17.1.orig/odb_api/src/odb_api/IteratorProxy.h
 +++ odb-api-0.17.1/odb_api/src/odb_api/IteratorProxy.h
-@@ -232,19 +232,19 @@ public:
- 		if (PyUnicode_Check(i))
+@@ -180,7 +180,7 @@ public:
+ 			size_t j = 0;
+ 			for (; j < sizeof(double) && s[j]; ++j)
+ 				; 
+-			return PyString_FromStringAndSize(s, j);
++			return PyUnicode_FromStringAndSize(s, j);
+ 		}
+ 		case INTEGER: return PyLong_FromDouble(d);
+ 		case BITFIELD:
+@@ -198,7 +198,7 @@ public:
+ 				mask >>= 1;
+ 			}
+ 			buf[sizeof(B)] = 0;
+-			return PyString_FromStringAndSize(buf, sizeof(B) + 1);
++			return PyUnicode_FromStringAndSize(buf, sizeof(B) + 1);
+ 		}
+ 		default: return PyFloat_FromDouble(d);
+ 		}
+@@ -229,22 +229,22 @@ public:
+ 			}
+ 			return l;
+ 		}
+-		if (PyString_Check(i))
++		if (PyUnicode_Check(i))
  		{
  			//cerr << "__getitem__: start: PyString " << PyString_AsString(PyObject_Repr(i)) << std::endl;
--			return getitem(PyUnicode_AsUTF8String(i));
+-			return getitem(PyString_AsString(i));
 +			return getitem(PyUnicode_AsUTF8(i));
  		}
- 		if (PyUnicode_Check(i))
+ 		if (PySlice_Check(i))
  		{
  			//cerr << "__getitem__: we've got a PySliceObject here: ";
 -			return getslice((PySliceObject*) i);
-+			return getslice( i);
++			return getslice(i);
  		}
  
  		long li = PyLong_AsLong(i);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/odb-api.git



More information about the debian-science-commits mailing list