From 4cc267856b57cfb5d69c7285c80c2616e3fccb66 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sun, 15 Jan 2023 15:48:15 -0800 Subject: [PATCH] Correct types in array header and sequence descriptors to match Lisp datatypes The "fillpointer" and "totalsize" fields of the array header and the "offst" of the sequence descriptor were declared as LispPTR, an unsigned type that represents an offset into the Lisp memory, however the Lisp datatype declaration indicates that these are FIXP (int32_t) rather than pointers. --- inc/array.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/inc/array.h b/inc/array.h index e08a9b3..d75d137 100644 --- a/inc/array.h +++ b/inc/array.h @@ -24,8 +24,8 @@ typedef struct sequencedescriptor { unsigned nil2 :1; unsigned base :28; unsigned typ :4; - unsigned length: 28; - LispPTR offst; + unsigned length :28; + int32_t offst; } Arrayp; struct arrayheader { @@ -41,8 +41,8 @@ struct arrayheader { unsigned extendablep :1; unsigned typenumber :8; DLword offset; - LispPTR fillpointer; - LispPTR totalsize; + int32_t fillpointer; + int32_t totalsize; }; #else typedef struct sequencedescriptor { @@ -100,9 +100,9 @@ typedef struct sequencedescriptor { unsigned readonly :1; unsigned nil :1; unsigned orig :1; - unsigned length: 28; + unsigned length :28; unsigned typ :4; - LispPTR offst; + int32_t offst; } Arrayp; struct arrayheader { @@ -118,8 +118,8 @@ struct arrayheader { unsigned bitp :1; unsigned indirectp :1; unsigned readonlyp :1; - LispPTR totalsize; - LispPTR fillpointer; + int32_t totalsize; + int32_t fillpointer; }; #else typedef struct sequencedescriptor { @@ -216,14 +216,6 @@ struct abdum #define FIRSTARRAYSEGMENT 19 #define MAXCELLSPERHUNK 64 -/****************** The following are for codereclaimer *********************/ - -#define BITSPERBITE 8 - -/********************* End of codereclaimer *********************************/ - - - /****************************************************************************/ /* */ /* End of Definitions */