From 777f6b3bcea4893d0655c7233cc3cd453857b634 Mon Sep 17 00:00:00 2001 From: Jason Paryani Date: Tue, 3 Sep 2013 22:25:12 -0700 Subject: [PATCH] Fix to_bytes for python3 --- capnp/capnp.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/capnp/capnp.pyx b/capnp/capnp.pyx index 321455e..ac7a60c 100644 --- a/capnp/capnp.pyx +++ b/capnp/capnp.pyx @@ -604,7 +604,8 @@ cdef class _DynamicStructBuilder: cdef _MessageBuilder builder = self._parent array = schema_cpp.messageToFlatArray(deref(builder.thisptr)) cdef const char* ptr = array.begin() - return ptr[:8*array.size()] + cdef bytes ret = ptr[:8*array.size()] + return ret cdef _get(self, field): return to_python_builder(self.thisptr.get(field), self._parent)