From e87722978bc9993cc5a862964366ee7cd0b7fb4c Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Tue, 18 Sep 2007 08:05:28 +0000 Subject: [PATCH] 1.0.9.63: Disallow (:not) in #+/#- expressions. NOT in feature expressions is specified to accept exactly one argument. The previous implementation of FEATUREP allowed zero or one argument, so tighten that check. Might need to fix CLRFI-1, as well (-: --- src/code/early-extensions.lisp | 23 +++++++++++++---------- version.lisp-expr | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/code/early-extensions.lisp b/src/code/early-extensions.lisp index 833adb7..65f98d7 100644 --- a/src/code/early-extensions.lisp +++ b/src/code/early-extensions.lisp @@ -924,16 +924,19 @@ ;;; handle arbitrary combinations of atoms using NOT, AND, OR. (defun featurep (x) (if (consp x) - (case (car x) - ((:not not) - (if (cddr x) - (error "too many subexpressions in feature expression: ~S" x) - (not (featurep (cadr x))))) - ((:and and) (every #'featurep (cdr x))) - ((:or or) (some #'featurep (cdr x))) - (t - (error "unknown operator in feature expression: ~S." x))) - (not (null (memq x *features*))))) + (case (car x) + ((:not not) + (cond + ((cddr x) + (error "too many subexpressions in feature expression: ~S" x)) + ((null (cdr x)) + (error "too few subexpressions in feature expression: ~S" x)) + (t (not (featurep (cadr x)))))) + ((:and and) (every #'featurep (cdr x))) + ((:or or) (some #'featurep (cdr x))) + (t + (error "unknown operator in feature expression: ~S." x))) + (not (null (memq x *features*))))) ;;;; utilities for two-VALUES predicates diff --git a/version.lisp-expr b/version.lisp-expr index 80aeb76..51f6012 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.9.62" +"1.0.9.63" -- 1.7.10.4