Skip to content

Commit

Permalink
Mark not unmapping macro-containing files as okay
Browse files Browse the repository at this point in the history
There isn't really a better alternative.
Making several mappings instead requires too much bookkeeping.
  • Loading branch information
ISSOtm committed Sep 27, 2020
1 parent 55bcaca commit 676ac30
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/asm/lexer.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ struct LexerState {
char *ptr; /* Technically `const` during the lexer's execution */
off_t size;
off_t offset;
bool isReferenced; /* If a macro in this file requires not unmapping it*/
bool isReferenced; /* If a macro in this file requires not unmapping it */
};
struct { /* Otherwise */
int fd;
Expand Down Expand Up @@ -2007,7 +2007,6 @@ void lexer_CaptureMacroBody(char **capture, size_t *size)

/* If the file is `mmap`ed, we need not to unmap it to keep access to the macro */
if (lexerState->isMmapped)
/* FIXME: this is godawful, but RGBASM doesn't even clean up anything anyways. */
lexerState->isReferenced = true;

/*
Expand Down

0 comments on commit 676ac30

Please sign in to comment.