We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a16f0e commit 644b5bbCopy full SHA for 644b5bb
src/flint/flint_base/flint_context.pxd
@@ -9,3 +9,17 @@ cdef class FlintContext:
9
cdef arf_rnd_t rnd
10
cdef public bint unicode
11
cdef public long _cap
12
+
13
+cdef FlintContext thectx
14
15
+cdef inline long getprec(long prec=0):
16
+ if prec > 1:
17
+ return prec
18
+ else:
19
+ return thectx._prec
20
21
+cdef inline long getcap(long cap=-1):
22
+ if cap >= 0:
23
+ return cap
24
25
+ return thectx._cap
src/flint/flint_base/flint_context.pyx
@@ -68,3 +68,5 @@ cdef class FlintContext:
68
69
def cleanup(self):
70
flint_cleanup()
71
72
+cdef FlintContext thectx = FlintContext()
0 commit comments