1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-13 03:14:32 +00:00

Silence warnings for incompatible pointer type assignments in stack pointer save/restore defines

CSTKPTR is "LispPTR *" while CurrentStackPTR is "DLword *", cast to "void *" to
  silence the warning, add comment pointing out size difference to explain the
  "- 1" vs "+ 2" adjustments when saving/restoring.
This commit is contained in:
Nick Briggs
2023-01-16 09:56:50 -08:00
parent 98a8d8be49
commit 2cb51ad326

View File

@@ -69,9 +69,9 @@
/* OPCODE interface routines */
#define StackPtrSave \
do { CurrentStackPTR = (DLword *)(CSTKPTR - 1); } while (0)
do { CurrentStackPTR = (void *)(CSTKPTR - 1); /* CSTKPTR in cells */ } while (0)
#define StackPtrRestore \
do { CSTKPTRL = ((LispPTR *)CurrentStackPTR) + 1; } while (0)
do { CSTKPTRL = (void *)(CurrentStackPTR + 2); /* CurrentStackPTR in DLwords */ } while (0)
#define EXT \
do { \