Fixed a typo in ecl_remf_setf_definition. Type-check also the SETF arguments to FBOUNDP.

This commit is contained in:
Juan Jose Garcia Ripoll 2011-12-16 20:08:28 +01:00
parent d21ba1d9aa
commit 0423bd23a3
2 changed files with 7 additions and 5 deletions

View file

@ -69,13 +69,13 @@ static void
ecl_rem_setf_definition(cl_object sym)
{
cl_env_ptr the_env = ecl_process_env();
ECL_WITH_GLOBAL_ENV_RDLOCK_BEGIN(the_env) {
ECL_WITH_GLOBAL_ENV_WRLOCK_BEGIN(the_env) {
cl_object pair = ecl_gethash_safe(sym, cl_core.setf_definitions, Cnil);
if (!Null(pair)) {
ECL_RPLACA(sym, Cnil);
ECL_RPLACA(pair, Cnil);
ecl_remhash(sym, cl_core.setf_definitions);
}
} ECL_WITH_GLOBAL_ENV_RDLOCK_END;
} ECL_WITH_GLOBAL_ENV_WRLOCK_END;
}
@(defun si::fset (fname def &optional macro pprint)

View file

@ -62,8 +62,10 @@ cl_fboundp(cl_object fname)
if (CONSP(sym) && CDR(sym) == Cnil) {
cl_object pair;
sym = CAR(sym);
pair = ecl_setf_definition(sym, Cnil);
@(return ecl_cdr(pair))
if (ECL_SYMBOLP(sym)) {
pair = ecl_setf_definition(sym, Cnil);
@(return ecl_cdr(pair));
}
}
}
}