Skip to content

Commit

Permalink
Fix CI on CPython 3.13 due to difference _decimal/_pydecimal
Browse files Browse the repository at this point in the history
Due to https://bugs.debian.org/1056785, it seems that now CI
images, used by cibuildwheels use _pydecimal implementation
of the decimal module.
  • Loading branch information
skirpichev committed May 20, 2024
1 parent 454f957 commit 4a05610
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gmpy2_convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ extern "C" {
MPZ_Check(x) || PyLong_Check(x) || \
XMPZ_Check(x) || HAS_MPQ_CONVERSION(x) || \
HAS_MPZ_CONVERSION(x))
#define IS_DECIMAL(x) (!strcmp(Py_TYPE(x)->tp_name, "decimal.Decimal"))
#define IS_DECIMAL(x) (!strcmp(Py_TYPE(x)->tp_name, "decimal.Decimal") || \
!strcmp(Py_TYPE(x)->tp_name, "Decimal"))
#define IS_REAL_ONLY(x) (MPFR_Check(x) || PyFloat_Check(x) || \
HAS_STRICT_MPFR_CONVERSION(x) || IS_DECIMAL(x))
#define IS_REAL(x) (IS_RATIONAL(x) || IS_REAL_ONLY(x))
Expand Down

0 comments on commit 4a05610

Please sign in to comment.