blob: db39173519632f5ac3e6b91d649b15c759eb7e5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
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 a5ef4f45c68..1a50d8fd392 100644
--- a/src/sage/libs/eclib/mat.pyx
+++ b/src/sage/libs/eclib/mat.pyx
@@ -10,6 +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 +214,7 @@ cdef class Matrix:
"""
cdef long n = self.nrows()
cdef long i, j, k
- cdef scalar* v = <scalar*> self.M.get_entries() # coercion needed to deal with const
+ cdef vector[scalar] v = <vector[scalar]> self.M.get_entries() # coercion needed to deal with const
cdef Matrix_integer_dense Td
cdef Matrix_integer_sparse Ts
|