From scaekenberghe at common-lisp.net Fri Mar 16 15:39:28 2007 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Fri, 16 Mar 2007 16:39:28 +0100 Subject: [cl-prevalence-devel] Re: bug in cl-prevalence In-Reply-To: <45F9698A.7070106@telenet.be> References: <45F9698A.7070106@telenet.be> Message-ID: <6E414069-9FA0-4446-ADE8-526E85FEAA13@common-lisp.net> On 15 Mar 2007, at 16:43, Phlex wrote: > Hello, > > I beleive I found a bug in your cl-prevalence package. It is in the > src/serialization.lisp file. > Here is what i think is the correct (serialize-sexp-internal hash- > table ? ?) method. > > (defmethod serialize-sexp-internal ((object hash-table) stream > serialization-state) > (let ((id (known-object-id serialization-state object))) > (if id > (progn > (write-string "(:REF . " stream) > (prin1 id stream) > (write-string ")" stream)) > (let ((count (hash-table-count object))) > (setf id (set-known-object serialization-state object)) > (write-string "(:HASH-TABLE " stream) > (prin1 id stream) > (write-string " :TEST " stream) > (print-symbol (hash-table-test object) stream) > (write-string " :SIZE " stream) > (prin1 (hash-table-size object) stream) > (write-string " :REHASH-SIZE " stream) > (prin1 (hash-table-rehash-size object) stream) > (write-string " :REHASH-THRESHOLD " stream) > (prin1 (hash-table-rehash-threshold object) stream) > (unless (zerop count) > (write-string " :ENTRIES (" stream) > (maphash #'(lambda (key value) > (write-string " (" stream) > (serialize-sexp-internal key stream > serialization-state) > (write-string " . " stream) > (serialize-sexp-internal value stream > serialization-state) > (princ ")" stream)) > object) > (write-string " )" stream)) ;;this line was added > (write-string " )" stream))))) ;;a closing parenthesis was > removed from the output string > > I hope this helps, and thanks for your work on this library. > > Sacha De Vos Thanks for noticing/reporting/fixing this bug, Sascha! I applied your change, committed it and re-released the tarball. Sven From ndj at hivsa.com Thu Mar 29 10:29:14 2007 From: ndj at hivsa.com (Nico de Jager) Date: Thu, 29 Mar 2007 12:29:14 +0200 Subject: [cl-prevalence-devel] set-slot-values Message-ID: <200703291229.14563.ndj@hivsa.com> Hi The symbol SET-SLOT-VALUES is exported from the cl-prevalence package, but there is no such function. Grepping for the string "set-slot-values" shows the string only in the files src/package.lisp and doc/CL-PREVALENCE.html. I downloaded the cl-prevalence.tgz tarball from common-lisp.net today to make sure I have the latest version of the library. Has this function been dropped accidentally or was it deprecated and should it be removed from the documentation file and package.lisp or am I missing something? Thanks. Nico From scaekenberghe at common-lisp.net Thu Mar 29 12:01:06 2007 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Thu, 29 Mar 2007 14:01:06 +0200 Subject: [cl-prevalence-devel] set-slot-values In-Reply-To: <200703291229.14563.ndj@hivsa.com> References: <200703291229.14563.ndj@hivsa.com> Message-ID: <9A628908-0E80-4723-8B03-D46DA9360651@common-lisp.net> Nico, You are right: that function was removed by a patch in october 2004. The original definition was -(defun set-slot-values (instance slots-and-values) - "Set slots and values of instance" - (dolist (slot-and-value slots-and-values instance) - (setf (slot-value instance (first slot-and-value)) (second slot- and-value)))) And it was called from tx-create-object and tx-change-object-slots, I believe. I have remove the symbol from the package export and from the documentation, and released everything. HTH, Sven On 29 Mar 2007, at 12:29, Nico de Jager wrote: > Hi > > The symbol SET-SLOT-VALUES is exported from the cl-prevalence > package, but there is no such function. Grepping for the string > "set-slot-values" shows the string only in the files src/ > package.lisp and doc/CL-PREVALENCE.html. I downloaded the cl- > prevalence.tgz tarball from common-lisp.net today to make sure I > have the latest version of the library. > > Has this function been dropped accidentally or was it deprecated > and should it be removed from the documentation file and > package.lisp or am I missing something? > > Thanks. > Nico > > _______________________________________________ > cl-prevalence-devel site list > cl-prevalence-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-prevalence-devel