Re: [cmucl-commit] CMUCL commit: src/code (package.lisp)

Madhu <[email protected]>
Newsgroups gmane.lisp.cmucl.devel
Message-ID <E1PWrUs-00056f-EV@rhea>
  |From: Raymond Toy <[email protected]>
  |Date: Sun, 26 Dec 2010 09:03:48 -0500
  |MIME-Version: 1.0
  |Content-Type: text/plain; charset="us-ascii"
  |
  |    Date: Sunday, December 26, 2010 @ 09:03:48
  |  Author: rtoy
  |    Path: /project/cmucl/cvsroot/src/code
  |
  |Modified: package.lisp
  |
  |Unintern removes the wrong symbol.  See
  |https://bugs.launchpad.net/sbcl/+bug/693796.

[It would be nice to have the whole relevant description in the
 repository, as part of the commit, instead of citing some website
 which may or may not be offline]

I believe this patch would break the following use case which used to
work earlier

$ cat test.l
(in-package "CL-USER")
(eval-when (load eval compile)
  (when (find-package "FOO-PACKAGE") (delete-package "FOO-PACKAGE"))
  (when (find-package "BAR-PACKAGE") (delete-package "BAR-PACKAGE")))
(defpackage "FOO-PACKAGE" (:export "BAR-SYMBOL"))
(defpackage "BAR-PACKAGE")
(eval-when (load eval compile)
  (unintern 'foo-package:bar-symbol "FOO-PACKAGE"))

(assert (not (find-symbol "BAR-SYMBOL" "FOO-PACKAGE")))

* (load (compile-file "test.l"))


  |Index: src/code/package.lisp
  |diff -u src/code/package.lisp:1.80 src/code/package.lisp:1.81
  |--- src/code/package.lisp:1.80	Tue Apr 20 13:57:45 2010
  |+++ src/code/package.lisp	Sun Dec 26 09:03:48 2010
  |@@ -1444,8 +1444,8 @@
  | 	    (remove symbol shadowing-symbols)))
  | 
  |     (multiple-value-bind (s w) (find-symbol name package)
  |-      (declare (ignore s))
  |-      (cond ((or (eq w :internal) (eq w :external))
  |+      (cond ((not (eq symbol s)) nil)
  |+	    ((or (eq w :internal) (eq w :external))
  | 	     (nuke-symbol (if (eq w :internal)
  | 			      (package-internal-symbols package)
  | 			      (package-external-symbols package))
_______________________________________________
cmucl-imp mailing list
[email protected]
http://lists.zs64.net/mailman/listinfo/cmucl-imp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.