From 3a8891dc54f83ccdc16bd4094f75cab2cd3dab6e Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 3 Sep 2006 02:12:03 +0000 Subject: [PATCH] r11085: support clisp --- debian/changelog | 6 ++++-- hyperobject.asd | 3 --- package.lisp | 5 +++++ tests.lisp | 17 +++++++++++------ views.lisp | 4 ++-- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index 52b5d7b..18ecc19 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ -cl-hyperobject (2.9.3-1) unstable; urgency=low +cl-hyperobject (2.10.0-1) unstable; urgency=low * Support CLISP + * Remove implementation-dependent access of type slot using + slot-definition-type instead. - -- Kevin M. Rosenberg Wed, 30 Aug 2006 22:18:00 -0600 + -- Kevin M. Rosenberg Fri, 01 Sep 2006 08:49:25 -0600 cl-hyperobject (2.9.2-1) unstable; urgency=low diff --git a/hyperobject.asd b/hyperobject.asd index 5cb624b..7848baf 100644 --- a/hyperobject.asd +++ b/hyperobject.asd @@ -35,6 +35,3 @@ (defmethod perform ((o test-op) (c (eql (find-system :hyperobject)))) (operate 'load-op 'hyperobject-tests) (operate 'test-op 'hyperobject-tests :force t)) - - - diff --git a/package.lisp b/package.lisp index 39664bf..89aa5cc 100644 --- a/package.lisp +++ b/package.lisp @@ -73,6 +73,7 @@ sb-pcl::direct-slot-definition-class sb-pcl::compute-effective-slot-definition sb-pcl::compute-effective-slot-definition-initargs sb-pcl::slot-value-using-class + sb-pcl:slot-definition-type sb-pcl:class-prototype sb-pcl:generic-function-method-class sb-pcl:intern-eql-specializer sb-pcl:make-method-lambda sb-pcl:generic-function-lambda-list sb-pcl::class-precedence-list) @@ -88,12 +89,15 @@ pcl::slot-value-using-class pcl:class-prototype pcl:generic-function-method-class pcl:intern-eql-specializer pcl:make-method-lambda pcl:generic-function-lambda-list + pcl:slot-definition-type pcl::class-precedence-list) #+clisp '(clos:class-name clos:class-slots clos:find-class clos::standard-class clos::slot-definition-name clos:finalize-inheritance clos::standard-direct-slot-definition clos::standard-effective-slot-definition clos::validate-superclass clos:direct-slot-definition-class + clos:effective-slot-definition-class + clos:slot-definition-type clos:compute-effective-slot-definition clos::compute-effective-slot-definition-initargs clos::slot-value-using-class @@ -103,6 +107,7 @@ #+scl '(clos::compute-effective-slot-definition-initargs clos::class-prototype + clos:slot-definition-type ;; note: make-method-lambda is not fbound ) diff --git a/tests.lisp b/tests.lisp index 9b68d98..15dc082 100644 --- a/tests.lisp +++ b/tests.lisp @@ -40,7 +40,7 @@ (addresses :initarg :addresses :accessor addresses :subobject t)) (:metaclass hyperobject-class) - (:default-initargs :first-name "" :last-name "" :dob 0 :resume nil) + (:default-initargs :first-name "" :last-name "" :dob 0 :resume nil) (:default-print-slots first-name last-name dob resume) (:user-name "Person") (:description "A Person") @@ -58,7 +58,7 @@ (phones :initarg :phones :accessor phones :subobject t)) (:metaclass hyperobject-class) - (:default-initargs :title nil :street nil) + (:default-initargs :title nil :street nil) (:user-name "Address" "Addresses") (:default-print-slots title street) (:description "An address")) @@ -90,7 +90,7 @@ (defparameter office (make-instance 'address :title "Office" :street "113 Main St." :phones (list office-phone-1 office-phone-2 office-phone-3))) - + (defparameter mary (make-instance 'person :first-name "Mary" :last-name "Jackson" :dob (encode-universal-time 1 2 3 4 5 2000) @@ -104,11 +104,11 @@ (rem-all-tests) -(deftest p1 (view-to-string mary) "Person: +(deftest :p1 (view-to-string mary :vid :compact-text) "Person: Mary Jackson Thu, 4 May 2000 03:02:01 Style & Grace ") -(deftest p2 (view-to-string mary :subobjects t) "Person: +(deftest :p2 (view-to-string mary :subobjects t :vid :compact-text) "Person: Mary Jackson Thu, 4 May 2000 03:02:01 Style & Grace Addresses: Home 321 Shady Lane @@ -122,8 +122,13 @@ Fax 123-0005 ") -(deftest p3 (view-to-string mary :vid :compact-text-labels) +(deftest :p3 (view-to-string mary :vid :compact-text-labels) "Person: first-name Mary last-name Jackson dob Thu, 4 May 2000 03:02:01 resume Style & Grace ") +(deftest :p4 (view-to-string mary :vid :compact-text) +"Person: + Mary Jackson Thu, 4 May 2000 03:02:01 Style & Grace +") + diff --git a/views.lisp b/views.lisp index b9274aa..91217bd 100644 --- a/views.lisp +++ b/views.lisp @@ -281,8 +281,8 @@ (user-name (esd-user-name slot)) (xml-user-name (escape-xml-string user-name)) (xml-tag (escape-xml-string user-name)) - (type (slot-value slot #-sbcl 'type - #+sbcl 'sb-pcl::%type)) + (type (slot-definition-type slot)) + (cdata (not (null (and (in vid :xml :xhtml :xml-link :xhtml-link :xml-labels :ie-xml-labels -- 2.34.1