From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Todd Newsgroups: gmane.lisp.guile.bugs Subject: ice-9/q.scm bug fix Date: Tue, 30 Dec 2003 19:36:22 -0600 Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Message-ID: <20031231013622.GA1069@Richard-Todds-Computer.local> Reply-To: Richard Todd NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1612353332==" X-Trace: sea.gmane.org 1072834662 7114 80.91.224.253 (31 Dec 2003 01:37:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2003 01:37:42 +0000 (UTC) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Dec 31 02:37:39 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AbVIp-0002l9-00 for ; Wed, 31 Dec 2003 02:37:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbWFl-0007PC-LB for guile-bugs@m.gmane.org; Tue, 30 Dec 2003 21:38:33 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbWFe-0007Ox-1a for bug-guile@gnu.org; Tue, 30 Dec 2003 21:38:26 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbWF6-00076C-W5 for bug-guile@gnu.org; Tue, 30 Dec 2003 21:38:24 -0500 Original-Received: from [66.171.158.77] (helo=Richard-Todds-Computer.local) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbWF6-000762-EV for bug-guile@gnu.org; Tue, 30 Dec 2003 21:37:52 -0500 Original-Received: by Richard-Todds-Computer.local (Postfix, from userid 501) id 1BC40617EF; Tue, 30 Dec 2003 19:36:22 -0600 (CST) Original-To: bug-guile@gnu.org User-Agent: Mutt/1.4i X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GUILE, GNU's Ubiquitous Extension Language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.bugs:1053 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:1053 --===============1612353332== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yEPQxsgoJgBvi8ip" Content-Disposition: inline --yEPQxsgoJgBvi8ip Content-Type: multipart/mixed; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline While looking through guile modules for my guile standard library project, I came across a bug in (ice-9 q) which makes the queue invalid if you pop all the entries off if it. It appears to be a lisp-ism, where (not '()) was expected to return #t, and of course in scheme it does not. Attached, you should find a patch for this bug. Example of the bug: (use-modules (ice-9 q)) (define a (make-q)) (enq! a 3) (deq! a) ;; at this point: (q? a) ==> #f ?!? a ==> (() 3) ; should be (() #f) thanks, Richard Todd --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="q.scm.patch" Content-Transfer-Encoding: quoted-printable Index: ice-9/ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/guile/guile/guile-core/ice-9/ChangeLog,v retrieving revision 1.597 diff -u -r1.597 ChangeLog --- ice-9/ChangeLog 19 Nov 2003 01:16:16 -0000 1.597 +++ ice-9/ChangeLog 31 Dec 2003 01:16:04 -0000 @@ -1,3 +1,8 @@ +2003-12-30 Richard Todd + + * q.scm (q-pop!): Fixed lisp-ism where (not '()) was=20 + expected to return #t. + 2003-11-19 Neil Jerram =20 * boot-9.scm (error-catching-loop): Defer lookup of Index: ice-9/q.scm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/guile/guile/guile-core/ice-9/q.scm,v retrieving revision 1.7 diff -u -r1.7 q.scm --- ice-9/q.scm 5 Apr 2003 19:04:27 -0000 1.7 +++ ice-9/q.scm 31 Dec 2003 01:16:04 -0000 @@ -136,7 +136,7 @@ (q-empty-check q) (let ((it (caar q)) (next (cdar q))) - (if (not next) + (if (null? next) (set-cdr! q #f)) (set-car! q next) it)) --dDRMvlgZJXvWKvBx-- --yEPQxsgoJgBvi8ip Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQE/8igVa9lhNGIqsRIRAluZAJ9w4OApN7vneS7+/XVj1LKw3Geg5QCfXgSH EXH639PAoO1l8rCPVKQJIaE= =eO9X -----END PGP SIGNATURE----- --yEPQxsgoJgBvi8ip-- --===============1612353332== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile --===============1612353332==--