[armedbear-cvs] r14429 - trunk/abcl/src/org/armedbear/lisp
rschlatte at common-lisp.net
rschlatte at common-lisp.net
Sat Mar 9 13:02:39 UTC 2013
Author: rschlatte
Date: Sat Mar 9 05:02:37 2013
New Revision: 14429
Log:
When deleting a package, remove its package-local nicknames everywhere
Modified:
trunk/abcl/src/org/armedbear/lisp/Package.java
Modified: trunk/abcl/src/org/armedbear/lisp/Package.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Package.java Sat Mar 9 05:02:30 2013 (r14428)
+++ trunk/abcl/src/org/armedbear/lisp/Package.java Sat Mar 9 05:02:37 2013 (r14429)
@@ -178,6 +178,13 @@
}
}
+ LispObject packages = Packages.getPackagesNicknamingPackage(this);
+ while (packages != NIL) {
+ Package p = (Package)((Cons)packages).car();
+ packages = ((Cons)packages).cdr();
+ p.removeLocalPackageNicknamesForPackage(this);
+ }
+
Packages.deletePackage(this);
makeSymbolsUninterned(internalSymbols);
@@ -810,6 +817,19 @@
}
}
+ public void removeLocalPackageNicknamesForPackage(Package p)
+ {
+ if (localNicknames == null || !localNicknames.containsValue(p)) {
+ return;
+ } else {
+ for (Map.Entry<String, Package> entry : localNicknames.entrySet()) {
+ if (entry.getValue() == p) {
+ localNicknames.remove(entry.getKey());
+ }
+ }
+ }
+ }
+
public Collection<Package> getLocallyNicknamedPackages()
{
// for implementing package-locally-nicknamed-by-list
More information about the armedbear-cvs
mailing list