Commit f60a719e authored by Julian Taylor's avatar Julian Taylor

cython0.19-compat.patch: fix build with cython 0.19

parent ff29314f
......@@ -5,6 +5,7 @@ pyzmq (2.2.0.1-3) unstable; urgency=low
[ Julian Taylor ]
* upload to unstable
* cython0.19-compat.patch: fix build with cython 0.19
-- Julian Taylor <jtaylor.debian@googlemail.com> Thu, 09 May 2013 15:07:29 +0200
......
Description: Cython 0.19 disables assignment of `char *` to `str`
Origin 22cede5dbda55dcab6a99137147e30f3be530cf1
Applied-Upstream: v13.0.1
Author: MinRK <benjaminrk@gmail.com>
--- a/zmq/utils/buffers.pxd
+++ b/zmq/utils/buffers.pxd
@@ -140,10 +140,11 @@ cdef inline object asbuffer(object ob, i
cdef void *bptr = NULL
cdef Py_ssize_t blen = 0, bitemlen = 0
- cdef str bfmt = None
cdef Py_buffer view
cdef int flags = PyBUF_SIMPLE
cdef int mode = 0
+
+ bfmt = None
mode = check_buffer(ob)
if mode == 0:
@@ -179,7 +180,7 @@ cdef inline object asbuffer(object ob, i
bitemlen = ob.itemsize
except AttributeError:
if isinstance(ob, bytes):
- bfmt = "B"
+ bfmt = b"B"
bitemlen = 1
else:
# nothing found
@@ -188,6 +189,9 @@ cdef inline object asbuffer(object ob, i
if base: base[0] = <void *>bptr
if size: size[0] = <Py_ssize_t>blen
if itemsize: itemsize[0] = <Py_ssize_t>bitemlen
+
+ if PY_MAJOR_VERSION >= 3 and bfmt is not None:
+ return bfmt.decode('ascii')
return bfmt
Description: make green py3 compatible
Applied-Upstream: 13.0.0
--- a/zmq/green/core.py.orig 2013-02-24 20:06:01.012299572 +0100
+++ b/zmq/green/core.py 2013-02-24 20:15:15.420298258 +0100
@@ -114,7 +114,7 @@
--- a/zmq/green/core.py
+++ b/zmq/green/core.py
@@ -114,7 +114,7 @@ class _Socket(_original_Socket):
try:
timeout.start()
self.__writable.get(block=True)
......@@ -11,7 +11,7 @@ Applied-Upstream: 13.0.0
if t is not timeout:
raise
toc = time.time()
@@ -138,7 +138,7 @@
@@ -138,7 +138,7 @@ class _Socket(_original_Socket):
try:
timeout.start()
self.__readable.get(block=True)
......@@ -20,4 +20,3 @@ Applied-Upstream: 13.0.0
if t is not timeout:
raise
toc = time.time()
fix-py3-green.patch
cython0.19-compat.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment