mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Mark not unmapping macro-containing files as okay
There isn't really a better alternative. Making several mappings instead requires too much bookkeeping.
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user