emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/sqlite dd834b3: Handle bignums on 32-bit


From: Lars Ingebrigtsen
Subject: scratch/sqlite dd834b3: Handle bignums on 32-bit
Date: Tue, 7 Dec 2021 15:39:38 -0500 (EST)

branch: scratch/sqlite
commit dd834b3b94f1f86afa90f0842d05b5a365a528e9
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Handle bignums on 32-bit
---
 src/sqlite.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/sqlite.c b/src/sqlite.c
index ce26712..5b728b7 100644
--- a/src/sqlite.c
+++ b/src/sqlite.c
@@ -131,8 +131,12 @@ bind_values (sqlite3 *db, sqlite3_stmt *stmt, Lisp_Object 
values)
                                   NULL);
        }
       else if (EQ (type, Qinteger))
-       /* FIXME: Bignums? */
-       ret = sqlite3_bind_int64 (stmt, i + 1, XFIXNUM (value));
+       {
+         if (BIGNUMP (value))
+           ret = sqlite3_bind_int64 (stmt, i + 1, bignum_to_intmax (value));
+         else
+           ret = sqlite3_bind_int64 (stmt, i + 1, XFIXNUM (value));
+       }
       else if (EQ (type, Qfloat))
        ret = sqlite3_bind_double (stmt, i + 1, XFLOAT_DATA (value));
       else if (NILP (value))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]