From 44ff96c68e2b8e0830ae0adefcd7f236536b7a20 Mon Sep 17 00:00:00 2001 From: dlichteblau Date: Sun, 27 Nov 2005 20:59:00 +0000 Subject: [PATCH] name-hashtable in den context gezogen, das war wohl kaum thread-safe so. allerdings keine ahnung wofuer sie ueberhaupt da ist. --- runes/encodings.lisp | 6 +++--- xml/xml-parse.lisp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/runes/encodings.lisp b/runes/encodings.lisp index ce8197a..df5217b 100644 --- a/runes/encodings.lisp +++ b/runes/encodings.lisp @@ -124,7 +124,7 @@ ;; Zeichen abwarten und nachgucken, dass nicht etwa die andere ;; Haelfte fehlt! (let ((x (logior (ash hi 8) lo))) - (when (or (eql x #xFFFE) (eql x #/U+FFFF)) + (when (or (eql x #xFFFE) (eql x #xFFFF)) (xerror "not a valid code point: #x~X" x)) (setf (aref out wptr) x)) (setf wptr (%+ 1 wptr)))) @@ -147,7 +147,7 @@ ;; Zeichen abwarten und nachgucken, dass nicht etwa die andere ;; Haelfte fehlt! (let ((x (logior (ash hi 8) lo))) - (when (or (eql x #xFFFE) (eql x #/U+FFFF)) + (when (or (eql x #xFFFE) (eql x #xFFFF)) (xerror "not a valid code point: #x~X" x)) (setf (aref out wptr) x)) (setf wptr (%+ 1 wptr)))) @@ -169,7 +169,7 @@ (xerror "surrogate encoded in UTF-8: #x~X." x)) (cond ((or (%> x #x10FFFF) (eql x #xFFFE) - (eql x #/U+FFFF)) + (eql x #xFFFF)) (xerror "not a valid code point: #x~X" x)) ((%> x #xFFFF) (setf (aref out (%+ 0 wptr)) (%+ #xD7C0 (ash x -10)) diff --git a/xml/xml-parse.lisp b/xml/xml-parse.lisp index 4b72119..bef28f9 100644 --- a/xml/xml-parse.lisp +++ b/xml/xml-parse.lisp @@ -213,6 +213,8 @@ model-stack (referenced-notations '()) (id-table (%make-rod-hash-table)) + ;; FIXME: Wofuer ist name-hashtable da? Will man das wissen? + (name-hashtable (make-rod-hashtable :size 2000)) (standalone-p nil) (entity-resolver nil) (disallow-internal-subset nil) @@ -479,14 +481,12 @@ (defun (setf rod-hash-get) (new-value hashtable rod &optional (start 0) (end (length rod))) (rod-hash-set new-value hashtable rod start end)) -(defparameter *name-hashtable* (make-rod-hashtable :size 2000)) - (defun intern-name (rod &optional (start 0) (end (length rod))) - (multiple-value-bind (value successp key) (rod-hash-get *name-hashtable* rod start end) + (multiple-value-bind (value successp key) (rod-hash-get (name-hashtable *ctx*) rod start end) (declare (ignore value)) (if successp key - (nth-value 1 (rod-hash-set t *name-hashtable* rod start end))))) + (nth-value 1 (rod-hash-set t (name-hashtable *ctx*) rod start end))))) ;;;; --------------------------------------------------------------------------- ;;;;