From 3cbb736e1e835d6cb765032979eb6ba20155b205 Mon Sep 17 00:00:00 2001 From: slava Date: Tue, 21 Nov 2006 08:54:58 +0000 Subject: [PATCH] Fix bug in XML; literal was being mutated --- contrib/xml/parser.factor | 2 +- contrib/xml/tokenizer.factor | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/xml/parser.factor b/contrib/xml/parser.factor index 8b0c05ec82..83fb265222 100644 --- a/contrib/xml/parser.factor +++ b/contrib/xml/parser.factor @@ -228,7 +228,7 @@ M: extra-attrs error. dup prolog-data set ; : init-xml ( string -- ) - code set { 0 1 1 } spot set + code set { 0 1 1 } clone spot set init-xml-stack init-ns-stack ; UNION: any-tag tag contained-tag ; diff --git a/contrib/xml/tokenizer.factor b/contrib/xml/tokenizer.factor index b8db767d72..25ea5aa362 100644 --- a/contrib/xml/tokenizer.factor +++ b/contrib/xml/tokenizer.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2005, 2006 Daniel Ehrenberg ! See http://factorcode.org/license.txt for BSD license. IN: xml -USING: errors hashtables io kernel math namespaces prettyprint sequences tools - generic strings char-classes ; +USING: errors hashtables io kernel math namespaces prettyprint +sequences tools generic strings char-classes ; SYMBOL: code #! Source code SYMBOL: spot #! { index line column } @@ -10,7 +10,7 @@ SYMBOL: spot #! { index line column } : set-index ( index -- ) 0 spot get set-nth ; : get-line ( -- line ) spot get second ; : set-line ( line -- ) 1 spot get set-nth ; -: get-column ( -- column ) 2 spot get nth ; +: get-column ( -- column ) spot get third ; : set-column ( column -- ) 2 spot get set-nth ; SYMBOL: prolog-data