ref: 4f7abfdb8bb9ab40f6e624a3353a76935a87321e
parent: 7fa991849d46f3eed307bccb1b3a051516d6c581
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Jan 20 22:11:51 EST 2025
fixnum builtin: use mptoi on 32-bit systems
--- a/builtins.c
+++ b/builtins.c
@@ -270,7 +270,11 @@
if(iscprim(v))
return fixnum(conv_to_int64(cp_data(p), cp_numtype(p)));
if(iscvalue(v) && cp_numtype(p) == T_MPINT)
+#ifdef BITS64
return fixnum(mptov(*(mpint**)cv_data(p)));
+#else
+ return fixnum(mptoi(*(mpint**)cv_data(p)));
+#endif
type_error("number", v);
}