]> git.eshelyaron.com Git - emacs.git/commit
Refactor buffering code in the Lisp reader
authorMattias EngdegÄrd <mattiase@acm.org>
Sat, 11 May 2024 11:14:13 +0000 (13:14 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 07:49:07 +0000 (09:49 +0200)
commit67267bbb8ddd5bffaa6eca1f29f72efa9f3c3230
tree19874e5a2c70352a19577b6bb87c9e6a166e2d7e
parent1820acc0e564275b4bc9e2138fb9bae9a8b775b2
Refactor buffering code in the Lisp reader

Abstract the buffering in the reader with a struct and plain functions
instead of rather unhygienic preprocessor macros.

* src/lread.c (READ_AND_BUFFER, INVALID_SYNTAX_WITH_BUFFER):
Removed, replaced with...
(readbuf_t, readbuf_grow, add_char_to_buffer, read_and_buffer)
(invalid_syntax_with_buffer): ...these new functions and struct.
(read0): Use new code instead of old preprocessor macros.

(cherry picked from commit 32a0367554334c14fc1a9242fa6bfc45abe3d032)
src/lread.c