From 3cc7b592d99d33768057f072e52a9dd640b7005e Mon Sep 17 00:00:00 2001 From: Edi Weitz Date: Thu, 29 Oct 2009 15:00:44 +0000 Subject: [PATCH] Update to 2.0.3 git-svn-id: svn://bknr.net/svn/trunk/thirdparty/cl-ppcre@4461 4281704c-cde7-0310-8518-8e2dc76b1ff0 --- CHANGELOG | 4 ++++ cl-ppcre.asd | 4 ++-- doc/index.html | 4 ++-- regex-class.lisp | 11 ++++++++--- specials.lisp | 5 ++++- util.lisp | 15 +++++++++++---- 6 files changed, 31 insertions(+), 12 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 76ad68a..4e12322 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +Version 2.0.3 +2009-10-28 +Use LW:SIMPLE-TEXT-STRING throughout for LispWorks + Version 2.0.2 2009-09-17 Fixed typo in chartest.lisp (caught by Peter Seibel) diff --git a/cl-ppcre.asd b/cl-ppcre.asd index 0e1e688..63798ad 100644 --- a/cl-ppcre.asd +++ b/cl-ppcre.asd @@ -1,5 +1,5 @@ ;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*- -;;; $Header: /usr/local/cvsrep/cl-ppcre/cl-ppcre.asd,v 1.48 2009/09/17 19:17:30 edi Exp $ +;;; $Header: /usr/local/cvsrep/cl-ppcre/cl-ppcre.asd,v 1.49 2009/10/28 07:36:15 edi Exp $ ;;; This ASDF system definition was kindly provided by Marco Baringer. @@ -37,7 +37,7 @@ (in-package :cl-ppcre-asd) (defsystem :cl-ppcre - :version "2.0.2" + :version "2.0.3" :serial t :components ((:file "packages") (:file "specials") diff --git a/doc/index.html b/doc/index.html index 5108afa..8a3b41b 100644 --- a/doc/index.html +++ b/doc/index.html @@ -151,7 +151,7 @@ href="http://weitz.de/regex-coach/">The Regex Coach. CL-PPCRE together with this documentation can be downloaded from http://weitz.de/files/cl-ppcre.tar.gz. The -current version is 2.0.2. +current version is 2.0.3.

CL-PPCRE comes with a system definition for ASDF and you compile and @@ -2208,7 +2208,7 @@ me her PowerBook to test early versions of CL-PPCRE with MCL and OpenMCL.

-$Header: /usr/local/cvsrep/cl-ppcre/doc/index.html,v 1.199 2009/09/17 19:13:00 edi Exp $ +$Header: /usr/local/cvsrep/cl-ppcre/doc/index.html,v 1.200 2009/10/28 07:36:31 edi Exp $

BACK TO MY HOMEPAGE diff --git a/regex-class.lisp b/regex-class.lisp index b35ef59..fb89c25 100644 --- a/regex-class.lisp +++ b/regex-class.lisp @@ -1,5 +1,5 @@ ;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-PPCRE; Base: 10 -*- -;;; $Header: /usr/local/cvsrep/cl-ppcre/regex-class.lisp,v 1.43 2009/09/17 19:17:31 edi Exp $ +;;; $Header: /usr/local/cvsrep/cl-ppcre/regex-class.lisp,v 1.44 2009/10/28 07:36:15 edi Exp $ ;;; This file defines the REGEX class. REGEX objects are used to ;;; represent the (transformed) parse trees internally @@ -248,7 +248,12 @@ defined by the user.")) (declare (ignore init-args)) "Automatically computes the length of a STR after initialization." (let ((str-slot (slot-value str 'str))) - (unless (typep str-slot 'simple-string) - (setf (slot-value str 'str) (coerce str-slot 'simple-string)))) + (unless (typep str-slot + #-:lispworks 'simple-string + #+:lispworks 'lw:simple-text-string) + (setf (slot-value str 'str) + (coerce str-slot + #-:lispworks 'simple-string + #+:lispworks 'lw:simple-text-string)))) (setf (len str) (length (str str)))) diff --git a/specials.lisp b/specials.lisp index 23d01d6..547a1ab 100644 --- a/specials.lisp +++ b/specials.lisp @@ -1,5 +1,5 @@ ;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-PPCRE; Base: 10 -*- -;;; $Header: /usr/local/cvsrep/cl-ppcre/specials.lisp,v 1.42 2009/09/17 19:17:32 edi Exp $ +;;; $Header: /usr/local/cvsrep/cl-ppcre/specials.lisp,v 1.43 2009/10/28 07:36:15 edi Exp $ ;;; globally declared special variables @@ -65,6 +65,9 @@ implementations like AllegroCL, CLISP, LispWorks, or SBCL.") (defvar *string* "" "The string which is currently scanned by SCAN. Will always be coerced to a SIMPLE-STRING.") +#+:lispworks +(declaim (lw:simple-text-string *string*)) +#-:lispworks (declaim (simple-string *string*)) (defvar *start-pos* 0 diff --git a/util.lisp b/util.lisp index 31ae3ff..8dd5fd2 100644 --- a/util.lisp +++ b/util.lisp @@ -1,5 +1,5 @@ ;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-PPCRE; Base: 10 -*- -;;; $Header: /usr/local/cvsrep/cl-ppcre/util.lisp,v 1.47 2009/09/17 19:17:32 edi Exp $ +;;; $Header: /usr/local/cvsrep/cl-ppcre/util.lisp,v 1.48 2009/10/28 07:36:15 edi Exp $ ;;; Utility functions and constants dealing with the character sets we ;;; use to encode character classes @@ -137,10 +137,15 @@ match [\\s] in Perl." "Coerces STRING to a simple STRING unless it already is one." (with-unique-names (=string=) `(let ((,=string= ,string)) - (cond ((simple-string-p ,=string=) + (cond (#+:lispworks + (lw:simple-text-string-p ,=string=) + #-:lispworks + (simple-string-p ,=string=) ,=string=) (t - (coerce ,=string= 'simple-string)))))) + (coerce ,=string= + #+:lispworks 'lw:simple-text-string + #-:lispworks 'simple-string)))))) (declaim (inline nsubseq)) (defun nsubseq (sequence start &optional (end (length sequence))) @@ -171,7 +176,9 @@ short form of VAR-LIST." (dolist (string string-list) #-:genera (declare (string string)) (incf total-size (length string))) - (let ((result-string (make-sequence 'simple-string total-size)) + (let ((result-string (make-sequence #-:lispworks 'simple-string + #+:lispworks 'lw:simple-text-string + total-size)) (curr-pos 0)) (declare (fixnum curr-pos)) (dolist (string string-list)