Skip to content

Commit ae6a7dd

Browse files
author
Marie BONBOIRE
committed
calloc
1 parent 832be74 commit ae6a7dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sage/matrix/matrix_modn_dense_template.pxi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ We test corner cases for multiplication::
9090
from libc.stdint cimport uint64_t
9191
from cpython.bytes cimport *
9292

93-
from cysignals.memory cimport check_malloc, check_allocarray, sig_malloc, sig_free
93+
from cysignals.memory cimport check_malloc, check_allocarray, check_calloc, sig_malloc, sig_free
9494
from cysignals.signals cimport sig_check, sig_on, sig_off
9595

9696
from sage.libs.gmp.mpz cimport *
@@ -447,8 +447,8 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
447447
if p >= MAX_MODULUS:
448448
raise OverflowError("p (=%s) must be < %s."%(p, MAX_MODULUS))
449449

450-
self._entries = <celement *>check_allocarray(self._nrows * self._ncols, sizeof(celement))
451-
self._matrix = <celement **>check_allocarray(self._nrows, sizeof(celement*))
450+
self._entries = <celement *>check_calloc(self._nrows * self._ncols, sizeof(celement))
451+
self._matrix = <celement **>check_calloc(self._nrows, sizeof(celement*))
452452

453453
cdef unsigned int k
454454
cdef Py_ssize_t i

0 commit comments

Comments
 (0)