From 1f985cf1a1e2f821e57a44f2b2a2e83b93a03c46 Mon Sep 17 00:00:00 2001 From: Mark Florisson Date: Wed, 12 Aug 2015 12:13:09 +0100 Subject: [PATCH] Fix typo in import --- cassandra/cython_deps.py | 2 +- cassandra/deserializers.pyx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cassandra/cython_deps.py b/cassandra/cython_deps.py index fdd15464..5cc86fe7 100644 --- a/cassandra/cython_deps.py +++ b/cassandra/cython_deps.py @@ -1,5 +1,5 @@ try: - from cassandra.rowparser import make_recv_results_rows + from cassandra.row_parser import make_recv_results_rows HAVE_CYTHON = True except ImportError: HAVE_CYTHON = False diff --git a/cassandra/deserializers.pyx b/cassandra/deserializers.pyx index 54ce1daf..ca5dc6d8 100644 --- a/cassandra/deserializers.pyx +++ b/cassandra/deserializers.pyx @@ -164,7 +164,8 @@ cdef class DesTimeType(Deserializer): cdef class DesUTF8Type(Deserializer): cdef deserialize(self, Buffer *buf, int protocol_version): - return to_bytes(buf).decode('utf8') + cdef val = to_bytes(buf) + return val.decode('utf8') cdef class DesVarcharType(DesUTF8Type): @@ -502,6 +503,7 @@ cpdef Deserializer find_deserializer(cqltype): def obj_array(list objs): """Create a (Cython) array of objects given a list of objects""" cdef object[:] arr + cdef Py_ssize_t i arr = cython_array(shape=(len(objs),), itemsize=sizeof(void *), format="O") # arr[:] = objs # This does not work (segmentation faults) for i, obj in enumerate(objs):