Fix typo in import

This commit is contained in:
Mark Florisson
2015-08-12 12:13:09 +01:00
parent fade6487e9
commit 1f985cf1a1
2 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -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):