shithub: femtolisp

Download patch

ref: eed24f24fb94349885ff81635646b33854a559a8
parent: 624a74abece109871a1780bb58f45ae61cef5ae5
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Mar 13 15:31:52 EDT 2023

(u)int_t -> llt(u)int_t

--- a/cvalues.c
+++ b/cvalues.c
@@ -1245,7 +1245,7 @@
 */
 int numeric_compare(value_t a, value_t b, int eq, int eqnans, char *fname)
 {
-    int_t ai, bi;
+    lltint_t ai, bi;
     numerictype_t ta, tb;
     void *aptr, *bptr;
 
@@ -1279,7 +1279,7 @@
 static value_t fl_div2(value_t a, value_t b)
 {
     double da, db;
-    int_t ai, bi;
+    lltint_t ai, bi;
     numerictype_t ta, tb;
     void *aptr, *bptr;
 
@@ -1303,7 +1303,7 @@
 
 static value_t fl_idiv2(value_t a, value_t b)
 {
-    int_t ai, bi;
+    lltint_t ai, bi;
     numerictype_t ta, tb;
     void *aptr, *bptr;
     int64_t a64, b64;
@@ -1348,7 +1348,7 @@
 
 static value_t fl_bitwise_op(value_t a, value_t b, int opcode, char *fname)
 {
-    int_t ai, bi;
+    lltint_t ai, bi;
     numerictype_t ta, tb, itmp;
     void *aptr=NULL, *bptr=NULL, *ptmp;
     int64_t b64;
--- a/flisp.h
+++ b/flisp.h
@@ -2,7 +2,7 @@
 #define FLISP_H
 
 typedef uintptr_t value_t;
-typedef int_t fixnum_t;
+typedef lltint_t fixnum_t;
 #ifdef BITS64
 #define T_FIXNUM T_INT64
 #else
--- a/llt/hashing.c
+++ b/llt/hashing.c
@@ -1,6 +1,6 @@
 #include "llt.h"
 
-uint_t nextipow2(uint_t i)
+lltuint_t nextipow2(lltuint_t i)
 {
     if (i==0) return 1;
     if ((i&(i-1))==0) return i;
--- a/llt/htable.inc
+++ b/llt/htable.inc
@@ -12,7 +12,7 @@
 #define HTIMPL(HTNAME, HFUNC, EQFUNC)                                   \
 static void **HTNAME##_lookup_bp(htable_t *h, void *key)                \
 {                                                                       \
-    uint_t hv;                                                          \
+    lltuint_t hv;                                                       \
     size_t i, orig, index, iter;                                        \
     size_t newsz, sz = hash_size(h);                                    \
     size_t maxprobe = max_probe(sz);                                    \
--- a/llt/llt.h
+++ b/llt/llt.h
@@ -44,13 +44,13 @@
 #ifdef BITS64
 #define NBITS 64
 #define TOP_BIT BIT63
-typedef uint64_t uint_t;
-typedef int64_t int_t;
+typedef uint64_t lltuint_t;
+typedef int64_t lltint_t;
 #else
 #define NBITS 32
 #define TOP_BIT BIT31
-typedef uint32_t uint_t;
-typedef int32_t int_t;
+typedef uint32_t lltuint_t;
+typedef int32_t lltint_t;
 #endif
 
 #define LOG2_10 3.3219280948873626
@@ -75,7 +75,7 @@
 void sleep_ms(int ms);
 
 /* hashing.c */
-uint_t nextipow2(uint_t i);
+lltuint_t nextipow2(lltuint_t i);
 uint32_t int32hash(uint32_t a);
 uint64_t int64hash(uint64_t key);
 uint32_t int64to32hash(uint64_t key);