Skip to content

Commit c454681

Browse files
committed
Use no_gc for nmod
1 parent 8d69a4e commit c454681

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/flint/types/nmod.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ cdef class nmod_ctx:
2323
cdef nmod new_nmod(self)
2424

2525

26+
@cython.no_gc
2627
cdef class nmod(flint_scalar):
2728
cdef mp_limb_t val
2829
cdef nmod_ctx ctx

src/flint/types/nmod.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ from flint.utils.flint_exceptions import DomainError
2222
cdef dict _nmod_ctx_cache = {}
2323

2424

25+
@cython.no_gc
2526
cdef class nmod_ctx:
2627
"""
2728
Context object for creating :class:`~.nmod` initalised
@@ -163,6 +164,7 @@ cdef class nmod_ctx:
163164
return r
164165

165166

167+
@cython.no_gc
166168
cdef class nmod(flint_scalar):
167169
"""
168170
The nmod type represents elements of Z/nZ for word-size n.

0 commit comments

Comments
 (0)