diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-12-08 11:32:48 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-12-08 13:00:32 -0800 |
commit | f0a1e9ec3fba3d5bea5bd62f525dba3fb005d1b1 (patch) | |
tree | d4d752498b6da8154e6d3cf8dfed94643ae67614 /lisp/emacs-lisp | |
parent | 162ba405ac144c2a0cb6854f791ff7d3203b0e2f (diff) | |
download | emacs-f0a1e9ec3fba3d5bea5bd62f525dba3fb005d1b1.tar.gz emacs-f0a1e9ec3fba3d5bea5bd62f525dba3fb005d1b1.tar.bz2 emacs-f0a1e9ec3fba3d5bea5bd62f525dba3fb005d1b1.zip |
Make read1 more reentrant
This is needed if ‘read’ is called soon after startup, before the
Unicode tables have been set up, and it reads a \N escape and
needs to look up a value the Unicode tables, a lookup that in turn
calls read1 recursively. Although this change doesn’t make ‘read’
fully reentrant, it’s good enough to handle this case.
* src/lread.c (read_buffer_size, read_buffer): Remove static vars.
(grow_read_buffer): Revamp to use locals, not statics, and to
record memory allocation un the specpdl. All callers changed.
(read1): Start with a stack-based buffer, and use the heap
only if the stack buffer is too small. Use unbind_to to
free any heap buffer allocated. Use bool for boolean.
Redo symbol loop so that only one call to grow_read_buffer
is needed.
(init_obarray): Remove no-longer-needed initialization.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions