1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-06 11:03:29 +00:00

Fix the FastRetCALL macro to use do {} while (0) style (#384)

This commit is contained in:
Nick Briggs
2021-06-17 13:21:00 -07:00
committed by GitHub
parent f42671022f
commit 1c47bf5df0
2 changed files with 6 additions and 5 deletions

View File

@@ -35,7 +35,7 @@
/* FAST case return use */
#ifndef RESWAPPEDCODESTREAM
#define FastRetCALL \
{ \
do { \
/* Get IVar from Returnee's IVAR offset slot(BF) */ \
IVar = Addr68k_from_LADDR(STK_OFFSET | GETWORD((DLword *)CURRENTFX -1)); \
/* Get FuncObj from Returnee's FNHEAD slot in FX */ \
@@ -43,10 +43,10 @@
Addr68k_from_LADDR(FX_FNHEADER); \
/* Get PC from Returnee's pc slot in FX */ \
PC = (ByteCode *)FuncObj + CURRENTFX->pc ; \
}
} while (0)
#else
#define FastRetCALL \
{ \
do { \
/* Get IVar from Returnee's IVAR offset slot(BF) */ \
IVar = Addr68k_from_LADDR(STK_OFFSET | GETWORD((DLword *)CURRENTFX -1)); \
/* Get FuncObj from Returnee's FNHEAD slot in FX */ \
@@ -59,7 +59,7 @@
byte_swap_code_block(FuncObj); \
FuncObj->byteswapped = 1; \
} \
}
} while (0)
#endif /* RESWAPPEDCODESTREAM */

View File

@@ -168,7 +168,8 @@ void contextsw(register DLword fxnum, register DLword bytenum, register DLword f
CHECKFX;
if (EndSTKP < CurrentStackPTR) error("contextsw:Illegal ESP");
#endif
FastRetCALL return;
FastRetCALL;
return;
}
} /* end contextsw */