[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/02: sxml: Make parser thread-safe.
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 01/02: sxml: Make parser thread-safe. |
Date: |
Fri, 22 Oct 2021 07:53:31 -0400 (EDT) |
civodul pushed a commit to branch main
in repository guile.
commit 3b42b1eb526a85e4fac772e1837046e56e3b9bdc
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Oct 22 13:49:40 2021 +0200
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.
---
module/sxml/upstream/input-parse.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/module/sxml/upstream/input-parse.scm
b/module/sxml/upstream/input-parse.scm
index e0bccfd..5f9e08c 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