From fe8476d6bc241a0bb40cde980693cb46d9395c91 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Thu, 10 Jan 2013 15:52:18 -0600 Subject: [PATCH] make include_file faster in the preprocessor --- preprocessor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/preprocessor.py b/preprocessor.py index 533615889..c4fdb47fb 100644 --- a/preprocessor.py +++ b/preprocessor.py @@ -556,9 +556,9 @@ def macro_translator(macro, token, line): def include_file(asm): """This is more reliable than rgbasm/rgbds including files on its own.""" - filename = asm.split("\"") - filename = filename[1].replace("\"","").replace("\n","") - lines = open(filename, 'r').readlines() + filename = asm.split("\"")[1] + + lines = open(filename, "r").readlines() for line in lines: read_line(line)