Fix to_bytes for python3

This commit is contained in:
Jason Paryani
2013-09-03 22:25:12 -07:00
parent 5e8745c365
commit 777f6b3bce

View File

@@ -604,7 +604,8 @@ cdef class _DynamicStructBuilder:
cdef _MessageBuilder builder = self._parent
array = schema_cpp.messageToFlatArray(deref(builder.thisptr))
cdef const char* ptr = <const char *>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)