Created
September 11, 2015 20:54
-
-
Save bsuh/e7cba8a61f482b8d8687 to your computer and use it in GitHub Desktop.
Faster reading of bytes from files in Emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/lread.c b/src/lread.c | |
index e1a4b33..4f17e39 100644 | |
--- a/src/lread.c | |
+++ b/src/lread.c | |
@@ -467,7 +467,7 @@ readbyte_from_file (int c, Lisp_Object readcharfun) | |
} | |
block_input (); | |
- c = getc (instream); | |
+ c = getc_unlocked (instream); | |
/* Interrupted reads have been observed while reading over the network. */ | |
while (c == EOF && ferror (instream) && errno == EINTR) | |
@@ -476,7 +476,7 @@ readbyte_from_file (int c, Lisp_Object readcharfun) | |
QUIT; | |
block_input (); | |
clearerr (instream); | |
- c = getc (instream); | |
+ c = getc_unlocked (instream); | |
} | |
unblock_input (); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment