Fix typo in import
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
try:
|
try:
|
||||||
from cassandra.rowparser import make_recv_results_rows
|
from cassandra.row_parser import make_recv_results_rows
|
||||||
HAVE_CYTHON = True
|
HAVE_CYTHON = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAVE_CYTHON = False
|
HAVE_CYTHON = False
|
||||||
|
|||||||
@@ -164,7 +164,8 @@ cdef class DesTimeType(Deserializer):
|
|||||||
|
|
||||||
cdef class DesUTF8Type(Deserializer):
|
cdef class DesUTF8Type(Deserializer):
|
||||||
cdef deserialize(self, Buffer *buf, int protocol_version):
|
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):
|
cdef class DesVarcharType(DesUTF8Type):
|
||||||
@@ -502,6 +503,7 @@ cpdef Deserializer find_deserializer(cqltype):
|
|||||||
def obj_array(list objs):
|
def obj_array(list objs):
|
||||||
"""Create a (Cython) array of objects given a list of objects"""
|
"""Create a (Cython) array of objects given a list of objects"""
|
||||||
cdef object[:] arr
|
cdef object[:] arr
|
||||||
|
cdef Py_ssize_t i
|
||||||
arr = cython_array(shape=(len(objs),), itemsize=sizeof(void *), format="O")
|
arr = cython_array(shape=(len(objs),), itemsize=sizeof(void *), format="O")
|
||||||
# arr[:] = objs # This does not work (segmentation faults)
|
# arr[:] = objs # This does not work (segmentation faults)
|
||||||
for i, obj in enumerate(objs):
|
for i, obj in enumerate(objs):
|
||||||
|
|||||||
Reference in New Issue
Block a user