Skip to content

Commit c7f6e6e

Browse files
make DISABLEGC a flag, wrong number
1 parent 45b931d commit c7f6e6e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ulisp-esp32.ino

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ jmp_buf toplevel_errorbuffer;
221221
jmp_buf *errorbuffer = &toplevel_errorbuffer;
222222
unsigned int Freespace = 0;
223223
object *Freelist;
224-
bool okaytogc = true;
225224
unsigned int I2CCount;
226225
unsigned int TraceFn[TRACEMAX];
227226
unsigned int TraceDepth[TRACEMAX];
@@ -239,8 +238,8 @@ char LastChar = 0;
239238
char LastPrint = 0;
240239

241240
// Flags
242-
enum flag { PRINTREADABLY, RETURNFLAG, ESCAPE, EXITEDITOR, LIBRARYLOADED, NOESC, NOECHO, MUFFLEERRORS };
243-
volatile uint8_t Flags = 0b00001; // PRINTREADABLY set by default
241+
enum flag { PRINTREADABLY, RETURNFLAG, ESCAPE, EXITEDITOR, LIBRARYLOADED, NOESC, NOECHO, MUFFLEERRORS, DISABLEGC };
242+
volatile uint16_t Flags = 0b00001; // PRINTREADABLY set by default
244243

245244
// Forward references
246245
object *tee;
@@ -498,7 +497,7 @@ unsigned int GCCount = 0;
498497
#endif
499498

500499
void gc (object *form, object *env) {
501-
if (!okaytogc) return;
500+
if (tstflag(DISABLEGC)) return;
502501
#if defined(printgcs)
503502
int start = Freespace;
504503
#endif
@@ -1709,7 +1708,7 @@ void superprint (object *form, int lm, pfun_t pfun) {
17091708
else supersub(form, lm + PPINDENT, 1, pfun);
17101709
}
17111710

1712-
const int ppspecials = 19;
1711+
const int ppspecials = 18;
17131712
const char ppspecial[ppspecials] PROGMEM =
17141713
{ DOTIMES, DOLIST, IF, SETQ, TEE, LET, LETSTAR, LAMBDA, WHEN, UNLESS, WITHI2C, WITHSERIAL, WITHSPI, WITHSDCARD, FORMILLIS, WITHCLIENT, UNWINDPROTECT, IGNOREERRORS/*, SP_ERROR*/ };
17151714

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy