shithub: rgbds

Download patch

ref: 930080f556fc5ac7c41a1e5e05e8ab01e1789142
parent: 8e7afb0ab38aa80464317774a5166e09bd5aa084
author: ISSOtm <[email protected]>
date: Tue Sep 22 13:18:57 EDT 2020

Mark not unmapping macro-containing files as okay

There isn't really a better alternative.
Making several mappings instead requires too much bookkeeping.

--- a/src/asm/lexer.c
+++ b/src/asm/lexer.c
@@ -304,7 +304,7 @@
 			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 @@
 
 	/* 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;
 
 	/*