diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-10-22 13:49:40 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-10-22 13:52:40 +0200 |
commit | 3b42b1eb526a85e4fac772e1837046e56e3b9bdc (patch) | |
tree | c2b2135fda17e80e35e6d31319644afb9e671a83 /module/sxml/upstream | |
parent | 06de31ecb776efa45558f88934ea7573af8371d0 (diff) | |
download | guile-3b42b1eb526a85e4fac772e1837046e56e3b9bdc.tar.gz |
sxml: Make parser thread-safe.
Fixes <https://bugs.gnu.org/51264>.
Lack of thread-safety would also affect the parser in (texinfo) because
it uses 'next-token-of'.
* module/sxml/upstream/input-parse.scm (input-parse:init-buffer): Always
return a fresh buffer.
Diffstat (limited to 'module/sxml/upstream')
-rw-r--r-- | module/sxml/upstream/input-parse.scm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/module/sxml/upstream/input-parse.scm b/module/sxml/upstream/input-parse.scm index e0bccfda8..5f9e08c4b 100644 --- a/module/sxml/upstream/input-parse.scm +++ b/module/sxml/upstream/input-parse.scm @@ -154,9 +154,8 @@ ; (e.g., during XML parsing). (define input-parse:init-buffer - (let ((buffer (make-string 512))) - (lambda () buffer))) - + (lambda () (make-string 512))) + ; See a better version below (define-opt (next-token-old prefix-skipped-chars break-chars |