From 8ec4fbdbe8a5577f94a7faefd5f9ae85ff0ee7f2 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 30 Jan 2025 16:31:08 +0100 Subject: [PATCH] fix: Define error values for functions not present in flint --- src/flint/flintlib/types/gr.pxd | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/flint/flintlib/types/gr.pxd b/src/flint/flintlib/types/gr.pxd index b62cc01e..3db145ba 100644 --- a/src/flint/flintlib/types/gr.pxd +++ b/src/flint/flintlib/types/gr.pxd @@ -5,6 +5,26 @@ from flint.flintlib.types.flint cimport ( flint_bitcnt_t, ) +cdef extern from *: + """ + /* + * The following functions were introduced in FLINT 3.2.0 + */ + + #if __FLINT_RELEASE < 30200 + #define gr_min(res, x, y, ctx) GR_UNABLE + #define gr_max(res, x, y, ctx) GR_UNABLE + #define gr_le(x, y, ctx) T_UNKNOWN + #define gr_lt(x, y, ctx) T_UNKNOWN + #define gr_ge(x, y, ctx) T_UNKNOWN + #define gr_gt(x, y, ctx) T_UNKNOWN + #define gr_abs_le(x, y, ctx) T_UNKNOWN + #define gr_abs_lt(x, y, ctx) T_UNKNOWN + #define gr_abs_ge(x, y, ctx) T_UNKNOWN + #define gr_abs_gt(x, y, ctx) T_UNKNOWN + #endif + """ + cdef extern from "flint/gr.h":