diff --git a/src/sage/libs/eclib/__init__.pxd b/src/sage/libs/eclib/__init__.pxd index d44d4fba865..84d1fc92275 100644 --- a/src/sage/libs/eclib/__init__.pxd +++ b/src/sage/libs/eclib/__init__.pxd @@ -55,7 +55,7 @@ cdef extern from "eclib/matrix.h": cdef cppclass mat: mat() mat(mat m) - scalar* get_entries() + vector[scalar] get_entries() scalar sub(long, long) long nrows() long ncols() @@ -67,7 +67,7 @@ cdef extern from "eclib/smatrix.h": cdef cppclass smat: smat() smat(smat m) - scalar* get_entries() + vector[scalar] get_entries() scalar sub(long, long) long nrows() long ncols() diff --git a/src/sage/libs/eclib/mat.pyx b/src/sage/libs/eclib/mat.pyx index bfdeb6ae5c1..e7abe369b2b 100644 --- a/src/sage/libs/eclib/mat.pyx +++ b/src/sage/libs/eclib/mat.pyx @@ -10,7 +10,7 @@ from sage.rings.integer_ring import ZZ from sage.matrix.matrix_integer_sparse cimport Matrix_integer_sparse from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense from sage.rings.integer cimport Integer - +from libcpp.vector cimport vector cdef class Matrix: """ @@ -213,7 +213,7 @@ cdef class Matrix: """ cdef long n = self.nrows() cdef long i, j, k - cdef scalar* v = self.M.get_entries() # coercion needed to deal with const + cdef vector[scalar] v = self.M.get_entries() # coercion needed to deal with const cdef Matrix_integer_dense Td cdef Matrix_integer_sparse Ts