summaryrefslogtreecommitdiff
path: root/module/sxml
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-10-22 13:49:40 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-22 13:52:40 +0200
commit3b42b1eb526a85e4fac772e1837046e56e3b9bdc (patch)
treec2b2135fda17e80e35e6d31319644afb9e671a83 /module/sxml
parent06de31ecb776efa45558f88934ea7573af8371d0 (diff)
downloadguile-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')
-rw-r--r--module/sxml/upstream/input-parse.scm5
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