It is necessary to check that the right symbol is being processed by UNEXPORT2, because blindly proceeding causes slight corruption of the package structure and may result in quite cryptic error messages in loosely connected pieces of code (A. Gavrilov)

This commit is contained in:
Juan Jose Garcia Ripoll 2010-03-20 12:12:48 +01:00
parent 062f864ab8
commit cdc6ea3363

View file

@ -554,7 +554,7 @@ cl_unexport2(cl_object s, cl_object p)
"Ignore lock and proceed", p, 2, s, p);
PACKAGE_OP_LOCK();
x = find_symbol_inner(name, p, &intern_flag);
if (intern_flag == 0) {
if (intern_flag == 0 || x != s) {
PACKAGE_OP_UNLOCK();
FEpackage_error("Cannot unexport ~S because it does not belong to package ~S.",
p, 2, s, p);